jitcraft/SemanticAnalysis.cpp
changeset 80 c58dff4e560c
parent 79 0206df35882c
child 83 79265b56316e
     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()) {