1.1 --- a/jitcraft/SemanticAnalysis.cpp Tue Jul 17 21:40:44 2012 -0700
1.2 +++ b/jitcraft/SemanticAnalysis.cpp Tue Jul 17 23:05:38 2012 -0700
1.3 @@ -355,6 +355,14 @@
1.4 node->setType(type);
1.5 break;
1.6
1.7 + case TOK_MINUS:
1.8 + if (!type->isFloat() && (!type->isInt32() || type->tag())) {
1.9 + unaryTypeError(node, node->token(), type);
1.10 + return;
1.11 + }
1.12 + node->setType(type);
1.13 + break;
1.14 +
1.15 default:
1.16 assert(node->token() == TOK_TILDE);
1.17 if (!type->isInt32() || type->tag()) {