diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t7899.check | 6 | ||||
-rw-r--r-- | test/files/neg/t7899.scala | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t7899.check b/test/files/neg/t7899.check new file mode 100644 index 0000000000..febfe76b8a --- /dev/null +++ b/test/files/neg/t7899.check @@ -0,0 +1,6 @@ +t7899.scala:5: error: type mismatch; + found : Int => Int + required: (=> Int) => ? + foo(identity)() + ^ +one error found diff --git a/test/files/neg/t7899.scala b/test/files/neg/t7899.scala new file mode 100644 index 0000000000..f2dea3ab1f --- /dev/null +++ b/test/files/neg/t7899.scala @@ -0,0 +1,7 @@ +object Test { + def foo[B](f: (=> Int) => B): () => B = () => f(0) + + def main(args: Array[String]) { + foo(identity)() + } +} |