diff options
Diffstat (limited to 'test/neg/vincent1.scala')
-rw-r--r-- | test/neg/vincent1.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/neg/vincent1.scala b/test/neg/vincent1.scala new file mode 100644 index 0000000000..afcb9a94f4 --- /dev/null +++ b/test/neg/vincent1.scala @@ -0,0 +1,17 @@ +module test { + + trait A { type T; } + + trait B { type T; } + + def functor(x: A): B with { type T = x.T } = + new B with { + type T = x.T; + }; + + val a = new A with { type T = String }; + val b = functor(a); + + val s: b.T = "coucou"; + +} |