QuickFix for EXPECTED_PARAMETER/RETURN_TYPE_MISMATCH (ChangeTypeFix)

This commit is contained in:
Wojciech Lopata
2013-04-16 12:33:42 +02:00
parent 328e579852
commit d396c08454
8 changed files with 133 additions and 0 deletions
@@ -0,0 +1,6 @@
// "Change type from 'String' to 'Int'" "true"
fun foo(f: (Int) -> String) {
foo {
(x: Int) -> ""
}
}
@@ -0,0 +1,9 @@
// "Change type from 'A' to 'B'" "true"
trait A {}
trait B : A {}
fun foo(f: (B) -> B) {
foo {
(b: B): B -> b
}
}
@@ -0,0 +1,6 @@
// "Change type from 'String' to 'Int'" "true"
fun foo(f: (Int) -> String) {
foo {
(x: String<caret>) -> ""
}
}
@@ -0,0 +1,9 @@
// "Change type from 'A' to 'B'" "true"
trait A {}
trait B : A {}
fun foo(f: (B) -> B) {
foo {
(b: B): A<caret> -> b
}
}