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
Edited by Rico Tzschichholz