fasterthanlime / jooc-legacy

:crocodile: The historical, initial implementation of an ooc compiler in Java
http://ooc-lang.org/
MIT License
115 stars 4 forks source link

Sloppy handling of sizeof arguments #66

Closed eeight closed 14 years ago

eeight commented 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.

nddrylliog commented 14 years ago

Added checking of sizeof arguments, with two tests. Thanks eeight for reporting! This closed by 2311b935171df17894830612f0727c93bb8ad7b6