From b6f5e674380bb7ad9f3f05608f7cc671406ae709 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 26 May 2020 07:24:53 -0700 Subject: [PATCH] Fixed operators on readonly struct fields --- IDEHelper/Compiler/BfModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index f50fbca1..ec5fbb16 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -12153,7 +12153,7 @@ BfTypedValue BfModule::ReferenceStaticField(BfFieldInstance* fieldInstance) { // Just fake it for the extern and unspecialized modules auto ptrType = CreatePointerType(fieldInstance->GetResolvedType()); - return BfTypedValue(GetDefaultValue(ptrType), fieldInstance->GetResolvedType(), true); + return BfTypedValue(mBfIRBuilder->GetFakeVal(), fieldInstance->GetResolvedType(), true); } BfIRValue globalValue;