diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-13 06:58:39 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-13 06:58:39 +0000 |
commit | 124103be216976f58548500d63933e08f3dc0096 (patch) | |
tree | 1cb4a1af8c66b5d7d1d1452c1a93ad43bc36576b | |
parent | 3a2529f9df9798ee5e73be7aaaf3029626fb3000 (diff) | |
download | scala-124103be216976f58548500d63933e08f3dc0096.tar.gz scala-124103be216976f58548500d63933e08f3dc0096.tar.bz2 scala-124103be216976f58548500d63933e08f3dc0096.zip |
Test case closes #1432, no review.
-rw-r--r-- | test/files/neg/bug1432.check | 6 | ||||
-rw-r--r-- | test/files/neg/bug1432.scala | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/neg/bug1432.check b/test/files/neg/bug1432.check new file mode 100644 index 0000000000..90bba0bf13 --- /dev/null +++ b/test/files/neg/bug1432.check @@ -0,0 +1,6 @@ +bug1432.scala:10: error: type mismatch; + found : (Int, Bug_NoUnique.Wrap[Bug_NoUnique.Wrap[Unit]] => Double) + required: (Int, Unit => Double) + def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) + ^ +one error found diff --git a/test/files/neg/bug1432.scala b/test/files/neg/bug1432.scala new file mode 100644 index 0000000000..638f36554f --- /dev/null +++ b/test/files/neg/bug1432.scala @@ -0,0 +1,12 @@ +object Bug_NoUnique { + + type TypeCon[Env] = (Int, Env=>Double) + + case class Wrap[E](parent:E) {} + + def wrap[E,A,Y](v : (A,E=>Y)) : (A,Wrap[E]=>Y) = + throw new Error("Body here") + + def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) +} + |