Fix failing assertion when running the test suite
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 26 Feb 2013 11:45:47 +0000 (12:45 +0100)
committerLars Knoll <lars.knoll@digia.com>
Tue, 26 Feb 2013 22:43:42 +0000 (23:43 +0100)
The test suite does things like "1 instanceof 1" and expects a
type error to be thrown. Therefore we should not assert(!"unreachable")
when instanceof is called with a numberic constant but just fall back
to the run-time implementation, which does the right thing.

Change-Id: Iced93e679d56f4491d38c50b669e12dd160c220c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/v4/qv4codegen.cpp

index 20a2021..8430a29 100644 (file)
@@ -661,7 +661,6 @@ IR::Expr *Codegen::binop(IR::AluOp op, IR::Expr *left, IR::Expr *right)
 
                 case IR::OpInstanceof:
                 case IR::OpIn:
-                    assert(!"unreachabe");
                     break;
 
                 case IR::OpIfTrue: // unary ops