We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f7eede commit 92a435aCopy full SHA for 92a435a
src/common/scripting/backend/codegen.cpp
@@ -12564,7 +12564,14 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx)
12564
{
12565
if (Init->IsStruct())
12566
12567
- ValueType = NewPointer(ValueType);
+ bool writable = true;
12568
+
12569
+ if(ctx.Version >= MakeVersion(4, 12, 0))
12570
+ {
12571
+ Init->RequestAddress(ctx, &writable);
12572
+ }
12573
12574
+ ValueType = NewPointer(ValueType, !writable);
12575
Init = new FxTypeCast(Init, ValueType, false);
12576
SAFE_RESOLVE(Init, ctx);
12577
}
0 commit comments