diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-27 13:27:35 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-27 13:27:35 +0000 |
commit | b40f4ba3221f1091f4821423f18c157907e9a3c7 (patch) | |
tree | 3cc32dc30da1f640bfc7df01a78f2e679803087d /test | |
parent | 9522f08f413305c949008e161984fd3900094e3f (diff) | |
download | scala-b40f4ba3221f1091f4821423f18c157907e9a3c7.tar.gz scala-b40f4ba3221f1091f4821423f18c157907e9a3c7.tar.bz2 scala-b40f4ba3221f1091f4821423f18c157907e9a3c7.zip |
closes #3873.
review by maier as no good deed goes unpunished
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t3873.check | 6 | ||||
-rw-r--r-- | test/files/neg/t3873.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t3873.scala | 12 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/t3873.check b/test/files/neg/t3873.check new file mode 100644 index 0000000000..54d6abdf63 --- /dev/null +++ b/test/files/neg/t3873.check @@ -0,0 +1,6 @@ +t3873.scala:11: error: type mismatch; + found : Test.a.B + required: a.B + wrongf(new A)(a.b) // should not compile -- TODO: improve error message? the "a" is ambiguous + ^ +one error found diff --git a/test/files/neg/t3873.flags b/test/files/neg/t3873.flags new file mode 100644 index 0000000000..1c26b24745 --- /dev/null +++ b/test/files/neg/t3873.flags @@ -0,0 +1 @@ +-Ydependent-method-types
\ No newline at end of file diff --git a/test/files/neg/t3873.scala b/test/files/neg/t3873.scala new file mode 100644 index 0000000000..e7815f0937 --- /dev/null +++ b/test/files/neg/t3873.scala @@ -0,0 +1,12 @@ +class A { + class B + def b: B = new B +} + +object Test { + def wrongf(a: A)(b: a.B): a.B = b + + val a = new A + wrongf(a)(a.b) + wrongf(new A)(a.b) // should not compile -- TODO: improve error message? the "a" is ambiguous +}
\ No newline at end of file |