QuickFix: change type of overridden property to type of overridding property
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'B.x' type to '(Int) -> Int'" "true"
|
||||
trait A {
|
||||
val x: (Int) -> Int
|
||||
}
|
||||
|
||||
trait B {
|
||||
val x: (Int) -> Int
|
||||
}
|
||||
|
||||
trait C : A, B {
|
||||
override val x: (Int) -> Int<caret>
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Change 'A.x' type to '(Int) -> Int'" "false"
|
||||
// ACTION: Change 'C.x' type to '(String) -> Int'
|
||||
// ERROR: <html>Return type is '(jet.Int) → jet.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (jet.String) → jet.Int <i>defined in</i> A</html>
|
||||
trait A {
|
||||
val x: (String) -> Int
|
||||
}
|
||||
|
||||
trait B {
|
||||
val x: (String) -> Any
|
||||
}
|
||||
|
||||
trait C : A, B {
|
||||
override val x: (Int) -> Int<caret>
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'B.x' type to '(Int) -> Int'" "true"
|
||||
trait A {
|
||||
val x: (Int) -> Int
|
||||
}
|
||||
|
||||
trait B {
|
||||
val x: (String) -> Any
|
||||
}
|
||||
|
||||
trait C : A, B {
|
||||
override val x: (Int) -> Int<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user