[FIR] Don't provide receiver as value in delegated constructor call
This commit is contained in:
@@ -37,8 +37,8 @@ class A(
|
||||
Companion.CONST,
|
||||
Nested.CONST,
|
||||
Interface.CONST,
|
||||
a,
|
||||
b()
|
||||
<!UNRESOLVED_REFERENCE!>a<!>,
|
||||
<!UNRESOLVED_REFERENCE!>b<!>()
|
||||
)
|
||||
|
||||
class Nested {
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
open class S(val a: Any, val b: Any, val c: Any) {}
|
||||
|
||||
object A : S(prop1, prop2, func()) {
|
||||
val prop1 = 1
|
||||
val prop2: Int
|
||||
get() = 1
|
||||
fun func() {}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
open class S(val a: Any, val b: Any, val c: Any) {}
|
||||
|
||||
object A : S(<!UNRESOLVED_REFERENCE!>prop1<!>, <!UNRESOLVED_REFERENCE!>prop2<!>, <!UNRESOLVED_REFERENCE!>func<!>()) {
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ class A : S (
|
||||
Companion.CONST,
|
||||
Nested.CONST,
|
||||
Interface.CONST,
|
||||
a,
|
||||
b()
|
||||
<!UNRESOLVED_REFERENCE!>a<!>,
|
||||
<!UNRESOLVED_REFERENCE!>b<!>()
|
||||
) {
|
||||
|
||||
class Nested {
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ class A : S {
|
||||
Companion.CONST,
|
||||
Nested.CONST,
|
||||
Interface.CONST,
|
||||
a,
|
||||
b()
|
||||
<!UNRESOLVED_REFERENCE!>a<!>,
|
||||
<!UNRESOLVED_REFERENCE!>b<!>()
|
||||
)
|
||||
|
||||
class Nested {
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.HashMap
|
||||
|
||||
//KT-250 Incorrect variable resolve in constructor arguments of superclass
|
||||
open class A(val x: Int)
|
||||
class B(y: Int) : A(x) //x is resolved as a property in a, so no error is generated
|
||||
class B(y: Int) : A(<!UNRESOLVED_REFERENCE!>x<!>) //x is resolved as a property in a, so no error is generated
|
||||
|
||||
//KT-617 Prohibit dollars in call to superclass constructors
|
||||
open class M(p: Int)
|
||||
@@ -29,9 +29,9 @@ abstract class TagWithText(name : String) : Tag(name) {
|
||||
open class BodyTag(name : String) : TagWithText(name) {
|
||||
}
|
||||
|
||||
class Body() : BodyTag(name) { // Must be an error!
|
||||
class Body() : BodyTag(<!UNRESOLVED_REFERENCE!>name<!>) { // Must be an error!
|
||||
}
|
||||
class Body1() : BodyTag(this.name) { // Must be an error!
|
||||
class Body1() : BodyTag(this.<!UNRESOLVED_REFERENCE!>name<!>) { // Must be an error!
|
||||
}
|
||||
|
||||
//more tests
|
||||
@@ -40,10 +40,10 @@ open class X(p: Int, r: Int) {
|
||||
val s = "s"
|
||||
}
|
||||
|
||||
class Y(i: Int) : X(i, rrr) {
|
||||
class Y(i: Int) : X(i, <!UNRESOLVED_REFERENCE!>rrr<!>) {
|
||||
val rrr = 3
|
||||
}
|
||||
|
||||
class Z(val i: Int) : <!INAPPLICABLE_CANDIDATE!>X<!>(s, x) {
|
||||
class Z(val i: Int) : X(<!UNRESOLVED_REFERENCE!>s<!>, <!UNRESOLVED_REFERENCE!>x<!>) {
|
||||
val x = 2
|
||||
}
|
||||
Reference in New Issue
Block a user