Merge pull request #244 from lopekpl/type_mismatch3

QuickFix for EXPECTED_PARAMETER/RETURN_TYPE_MISMATCH
This commit is contained in:
Zalim Bashorov
2013-04-17 07:35:08 -07:00
10 changed files with 137 additions and 4 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
}
}