diff options
Diffstat (limited to 'test')
-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) +} + |