From e032852d12a301fb8ee8b10fe1f6a6f6eb09b7d4 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 13 Jul 2011 05:08:12 +0000 Subject: Catch type projections even when they disguise ... Catch type projections even when they disguise themselves as stable via singleton bounds. Closes #1431, review by odersky. --- test/files/neg/bug1431.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/neg/bug1431.scala (limited to 'test/files/neg/bug1431.scala') diff --git a/test/files/neg/bug1431.scala b/test/files/neg/bug1431.scala new file mode 100644 index 0000000000..aff1dbc014 --- /dev/null +++ b/test/files/neg/bug1431.scala @@ -0,0 +1,10 @@ +object Bug_New { + trait MyTrait { + type Alpha + def the_value : Alpha + class Factory() {def value : Alpha = the_value} + } + + def fun[X<:MyTrait with Singleton]() = new X#Factory().value +} + -- cgit v1.2.3