Skip to content

Commit 0616f4f

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 30e278b + 4b8a423 commit 0616f4f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/OneScript.Native/Compiler/MethodCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void CompileFragment(BslSyntaxNode node, Action<BslSyntaxNode> visitor)
9999
{
100100
MethodReturn = Expression.Label(typeof(BslValue))
101101
});
102-
Symbols.PushScope(new SymbolScope(), ScopeBindingDescriptor.Static(null));
102+
Symbols.PushScope(new SymbolScope(), ScopeBindingDescriptor.ThisScope());
103103
FillParameterVariables();
104104

105105
try

src/ScriptEngine/Compiler/StackMachineCodeGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ protected override void VisitModuleBody(BslSyntaxNode child)
199199

200200
var entry = _module.Code.Count;
201201
var localCtx = new SymbolScope();
202-
_ctx.PushScope(localCtx, ScopeBindingDescriptor.Static(null));
202+
_ctx.PushScope(localCtx, ScopeBindingDescriptor.ThisScope());
203203

204204
try
205205
{
@@ -294,7 +294,7 @@ protected override void VisitMethod(MethodNode methodNode)
294294
methodCtx.DefineVariable(new LocalVariableSymbol(paramNode.Name));
295295
}
296296

297-
_ctx.PushScope(methodCtx, ScopeBindingDescriptor.Static(null));
297+
_ctx.PushScope(methodCtx, ScopeBindingDescriptor.ThisScope());
298298
var entryPoint = _module.Code.Count;
299299
try
300300
{

0 commit comments

Comments
 (0)