From 1d42cde61d36121a8ef4258839f501644d04a443 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sun, 9 Aug 2020 07:18:46 -0700 Subject: [PATCH] Fixed lack of error with assignment checking in expression-body methods --- IDEHelper/Compiler/BfModule.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index f8199653..6648e6a7 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -4349,7 +4349,10 @@ void BfModule::CreateValueTypeEqualsMethod(bool strictEquals) if (fieldInstance->mResolvedType->IsValuelessType()) continue; - + + if (fieldInstance->mResolvedType->IsVar()) + continue; + BfTypedValue leftValue = ExtractValue(leftTypedVal, fieldInstance, fieldInstance->mDataIdx); BfTypedValue rightValue = ExtractValue(rightTypedVal, fieldInstance, fieldInstance->mDataIdx); @@ -18353,7 +18356,7 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup) for (auto localVar : mCurMethodState->mLocals) { - if ((skipEndChecks) || (bodyBlock == NULL)) + if ((skipEndChecks) || (methodDef->mBody == NULL)) break; LocalVariableDone(localVar, true);