Closed eeight closed 14 years ago
Following code compiles just fine with ooc checked out of git: "%d" format(sizeof(String, 123)) println()
And following code crashes ooc: "%d" format(sizeof()) println()
As I can see in org/ooc/backend/cdirty/CallWriter.java, it is never checked that sizeof has exactly one argument.
Added checking of sizeof arguments, with two tests. Thanks eeight for reporting! This closed by 2311b935171df17894830612f0727c93bb8ad7b6
Following code compiles just fine with ooc checked out of git: "%d" format(sizeof(String, 123)) println()
And following code crashes ooc: "%d" format(sizeof()) println()
As I can see in org/ooc/backend/cdirty/CallWriter.java, it is never checked that sizeof has exactly one argument.