QuickFix: change type of overridden property to type of overridding property

This commit is contained in:
Wojciech Lopata
2013-05-15 21:16:41 +02:00
parent 0d65a1b789
commit 9fdbd01660
6 changed files with 89 additions and 9 deletions
@@ -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>
}
@@ -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) &rarr; jet.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (jet.String) &rarr; 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>
}
@@ -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>
}