[FIR] Split primary constructor parameter scope into two different

In init block or property initializers,
for `val x` declared in primary constructor,
`x` reference is now resolved to property, not to parameter.
So we need two different scopes for primary constructor,
one for 'pure' parameters and another one for all parameters,
including val/var ones.

#KT-42844 Fixed
This commit is contained in:
Mikhail Glukhikh
2020-10-21 10:39:59 +03:00
parent 2d0535a713
commit 7b4f781ea8
24 changed files with 592 additions and 426 deletions
@@ -7,7 +7,7 @@ FILE: simpleDelegatedToMap.kt
public final val map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>| = R|<local>/map|
public get(): R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|
public final var foo: R|kotlin/Any|by R|<local>/map|
public final var foo: R|kotlin/Any|by this@R|/C|.R|/C.map|
public get(): R|kotlin/Any| {
^ this@R|/C|.D|/C.foo|.R|kotlin/collections/getValue|<R|kotlin/Any|, R|kotlin/Any|>(this@R|/C|, ::R|/C.foo|)
}