Fix ctor param reassignment regression
This commit is contained in:
1 parent
96947aac50
commit
a4f41f17bf
4 files changed
+129
-1
No files matched your search
@@ -3266,7 +3266,13 @@ class Compiler(
|
||||
this.currentClassCtx = cls
|
||||
try {
|
||||
(thisObj as? ObjInstance)?.let { i ->
|
||||
annotatedFnBody.execute(ClosureScope(this, i.instanceScope))
|
||||
val execScope = i.instanceScope.createChildScope(
|
||||
pos = this.pos,
|
||||
args = this.args,
|
||||
newThisObj = i
|
||||
)
|
||||
execScope.currentClassCtx = cls
|
||||
annotatedFnBody.execute(execScope)
|
||||
} ?: annotatedFnBody.execute(thisObj.autoInstanceScope(this))
|
||||
} finally {
|
||||
this.currentClassCtx = savedCtx
|
||||
|
||||
Reference in new issue
Block a user