Commit ee7c4f47 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Small irgen fix

parent ad891772
......@@ -2607,7 +2607,7 @@ public:
}
CompilerVariable* contains(IREmitter& emitter, const OpInfo& info, VAR* var, CompilerVariable* lhs) override {
return undefVariable();
return boolFromI1(emitter, llvm::UndefValue::get(g.i1));
}
CompilerVariable* getitem(IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var,
......
......@@ -874,7 +874,8 @@ private:
if (type == AST_TYPE::In || type == AST_TYPE::NotIn) {
CompilerVariable* r = right->contains(emitter, getOpInfoForNode(node, unw_info), left);
assert(r->getType() == BOOL);
ASSERT(r->getType() == BOOL, "%s gave %s", right->getType()->debugName().c_str(),
r->getType()->debugName().c_str());
if (type == AST_TYPE::NotIn) {
ConcreteCompilerVariable* converted = r->makeConverted(emitter, BOOL);
// TODO: would be faster to just do unboxBoolNegated
......
......@@ -32,3 +32,13 @@ try:
print 1.0[0]
except TypeError, e:
print e
def f2():
if 0:
1 in l
l = []
for i in xrange(100):
f2()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment