Fix superTypes test by adding parameter to primary constructor
This commit is contained in:
committed by
Mikhail Glukhikh
parent
f0c7aadb20
commit
f0e7dcc4f6
@@ -5,8 +5,9 @@ abstract class Base<T>(var x: T) {
|
||||
}
|
||||
|
||||
// constructor Base<T>(Int)
|
||||
// │
|
||||
class Derived(var x: Int): Base<Int>() {
|
||||
// │ Derived.<init>.x: Int
|
||||
// │ │
|
||||
class Derived(var x: Int): Base<Int>(x) {
|
||||
override fun replace(newValue: Int) {
|
||||
// var (Derived).x: Int
|
||||
// │ Derived.replace.newValue: Int
|
||||
|
||||
@@ -4,7 +4,7 @@ abstract class Base<T>(var x: T) {
|
||||
fun replace(newValue: T)
|
||||
}
|
||||
|
||||
class Derived(var x: Int): Base<Int>() {
|
||||
class Derived(var x: Int): Base<Int>(x) {
|
||||
override fun replace(newValue: Int) {
|
||||
x = newValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user