diff -r 0206df35882c -r c58dff4e560c jitcraft/SemanticAnalysis.cpp --- a/jitcraft/SemanticAnalysis.cpp Tue Jul 17 21:40:44 2012 -0700 +++ b/jitcraft/SemanticAnalysis.cpp Tue Jul 17 23:05:38 2012 -0700 @@ -355,6 +355,14 @@ node->setType(type); break; + case TOK_MINUS: + if (!type->isFloat() && (!type->isInt32() || type->tag())) { + unaryTypeError(node, node->token(), type); + return; + } + node->setType(type); + break; + default: assert(node->token() == TOK_TILDE); if (!type->isInt32() || type->tag()) {