removed incorrect code from resolve tests
Resolve tests had a functionality that for primary constructor parameters class A(val x: Int, y: Int) `$x` was resolved to property descriptor while `x` was resolved to value parameter descriptor. But it worked incorrect (see tests changes) and was senseless because 'x' in code always resolves to property descriptor. So it was dropped.
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
|
||||
class C(~x~x : Int, ~y~val y : Int) : Base(`x`x /*parameter*/), Base1 by Base1(`x`x) {
|
||||
var z = `x`x // parameter
|
||||
get() = `$x`x // property
|
||||
var zx = `x`x // parameter
|
||||
get() = `!`x // inaccessible
|
||||
|
||||
var zy = `y`y // parameter
|
||||
get() = `y`y // property
|
||||
|
||||
{
|
||||
val z = `x`x // parameter
|
||||
val wx = `x`x
|
||||
val wy = `y`y
|
||||
}
|
||||
|
||||
val foo = `$y`y
|
||||
val fx = `x`x
|
||||
val fy = `y`y
|
||||
|
||||
this() : this(1, 2) {
|
||||
val z = x // inaccessible
|
||||
val zz = `$y`y // property
|
||||
}
|
||||
|
||||
fun f() : Int {
|
||||
return `$x`x // property
|
||||
fun test() {
|
||||
val ux = `!`x // inaccessible
|
||||
val uy = `y`y // property
|
||||
}
|
||||
}
|
||||
|
||||
class D(~a~a: Int) {
|
||||
val a = `a`a
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
class A(~a~val a : Int) {
|
||||
~b~val b = `$a`a
|
||||
~f~fun f() = `$a`a
|
||||
~b~val b = `a`a
|
||||
~f~fun f() = `a`a
|
||||
}
|
||||
|
||||
fun test() {
|
||||
~va~val a = A()
|
||||
`va`a.`$a`a`:kotlin::Int`
|
||||
`va`a.`a`a`:kotlin::Int`
|
||||
a.`b`b`:kotlin::Int`
|
||||
a.`f`f()`:kotlin::Int`
|
||||
}
|
||||
|
||||
class Foo(~bar~var bar : Int, ~barr~barr : Int, ~barrr~val barrr : Int) {
|
||||
{
|
||||
`$bar`bar = 1
|
||||
`bar`bar = 1
|
||||
`barr`barr = 1
|
||||
`$barrr`barrr = 1
|
||||
`barrr`barrr = 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user