Last active
August 29, 2015 13:57
-
-
Save grapefrukt/9386278 to your computer and use it in GitHub Desktop.
Compiler bug? "Variable initialization must be a constant value" despite being just that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
// this particular setup gives me the error: | |
// Main.hx:12: characters 22-85 : Variable initialization must be a constant value | |
// set either GRID_SIZE, CELL_SIZE or OUTLINE_RATIO to anything else and it's fine | |
public static inline var GRID_SIZE :Int = 20; | |
public static inline var CELL_SIZE :Int = GRID_SIZE - 2; | |
public static inline var OUTLINE_RATIO :Float = 1.2; | |
public static inline var CELL_OUTLINE_W :Int = Std.int(CELL_SIZE * OUTLINE_RATIO); | |
public static function main() { | |
// do nothing | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aaaand, as I went to the haxe website to report this I saw that 3.1.0 was released and fixed this. (this affected 3.0.0)