Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 702
    • Issues 702
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 38
    • Merge Requests 38
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #16

Closed
Open
Opened Oct 10, 2008 by bugzilla-migration@bugzilla-migrationReporter

Valac doesn't check any cast at compile time

Submitted by Matias

Link to original bug (#555754)

Description

Please describe the problem: This testcase shows that vala doesn´t check any cast at compile time:

public class Test : Object
{
	construct
	{
		double g = (double)function;
		print ("%g\n", g);
	}
	
	public int function ()
	{
		return 3;
	}
	
	public static void main (string[] args)
	{
		var test = new Test ();
	}
}

Valac compiles with no errors, but gcc detect the error in the cast. Valac should detect this and notice that error.

Steps to reproduce: 1. 2. 3.

Actual results:

Expected results:

Does this happen every time?

Other information:

Blocking

  • Bug 604682
Edited Jul 16, 2020 by Rico Tzschichholz
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
1.2
Milestone
1.2
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#16