1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 14:54:09 +02:00

We were failing on an invalid type lookup in a tuple bind

This commit is contained in:
Brian Fiete 2019-09-29 07:42:58 -07:00
parent 4b2238337d
commit dfbf7a2792

View file

@ -2089,6 +2089,8 @@ void BfModule::HandleCaseEnumMatch_Tuple(BfTypedValue tupleVal, const BfSizedArr
if (!isVarOrLet) if (!isVarOrLet)
{ {
auto wantType = ResolveTypeRef(varDecl->mTypeRef); auto wantType = ResolveTypeRef(varDecl->mTypeRef);
if (wantType == NULL)
wantType = mContext->mBfObjectType;
if (wantType != NULL) if (wantType != NULL)
tupleElement = Cast(varDecl->mTypeRef, tupleElement, wantType); tupleElement = Cast(varDecl->mTypeRef, tupleElement, wantType);
if (!tupleElement) if (!tupleElement)
@ -4829,7 +4831,10 @@ void BfModule::Visit(BfUsingStatement* usingStmt)
failed = true; failed = true;
} }
else else
embeddedValue = BfTypedValue(localVar->mAddr, localVar->mResolvedType, true); {
embeddedValue = exprEvaluator.LoadLocal(localVar);
}
//exprEvaluator.CheckModifyResult(embeddedValue, usingStmt->mVariableDeclaration->mNameNode,);
} }
else else
{ {