GNOME Bugzilla – Bug 790648
Variables alone inside () are wrongly interpreted as a cast
Last modified: 2018-05-22 15:56:56 UTC
Created attachment 364091 [details] Two simple functions that don't compile In the version 0.36 and 0.38 the vala compiler interpret variables with parenthesis around it as a caster to objects with the same name of the variable. This doesn't happen in the version 0.34 from Ubuntu 17.04 where the compile works as expected. Is appended a file with two function that generate errors. The functions: int posix_wexitstatus(int status) { return (((status) & 0xff00) >> 8); } int multiplication(int a, int b){ double alpha = 0.5; return (alpha)*a*b; } The errors: bug.vala:3.16-3.21: error: The type name `status' could not be found return (((status) & 0xff00) >> 8); ^^^^^^ bug.vala:8.10-8.14: error: The type name `alpha' could not be found return (alpha)*a*b; ^^^^^ Compilation failed: 2 error(s), 0 warning(s) Makefile:2: recipe for target 'all' failed make: *** [all] Error 1 In both cases (status) and (alpha) were previously instantiated and declared as int and double respectively.
*** Bug 783928 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/604.