Make "type mismatch" quickfixes not available in case of error types

This commit is contained in:
Wojciech Lopata
2013-05-29 13:52:27 +02:00
parent 2a97617880
commit 4bf7151e47
5 changed files with 42 additions and 0 deletions
@@ -0,0 +1,10 @@
// "Change 'B.x' type to '(String) -> [ERROR : Ay]'" "false"
// ACTION: Change 'A.x' type to '(Int) -> 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; [ERROR : Ay] <i>defined in</i> A</html>
// ERROR: Unresolved reference: Ay
trait A {
val x: (String) -> Ay
}
trait B : A {
override val x: (Int) -> Int<caret>
}
@@ -0,0 +1,6 @@
// "Change 'foo' function return type to '([ERROR : NoSuchType]) -> Int'" "false"
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>jet.Int</td></tr><tr><td>Found:</td><td>([ERROR : NoSuchType]) &rarr; jet.Int</td></tr></table></html>
// ERROR: Unresolved reference: NoSuchType
fun foo(): Int {
return { (x: NoSuchType<caret>) -> 42 }
}