From e8a160c8c64354b12423b908067a1ba328d6248f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 24 Oct 2013 20:09:30 +0200 Subject: Fixed problem in handing of self types. Self types were not taken into account when doing a typedIdent. The fix in typedIdent caused as CyclicReference when typing the self type itself. This in turn is fixed by distinguishing more carefully in denotNamed in Namer which context we are in. --- tests/pos/selftypes.scala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/pos/selftypes.scala (limited to 'tests/pos') diff --git a/tests/pos/selftypes.scala b/tests/pos/selftypes.scala new file mode 100644 index 000000000..243405f77 --- /dev/null +++ b/tests/pos/selftypes.scala @@ -0,0 +1,20 @@ +object selftypes { + + trait A { self: AB => + + type AA = List[this.BX] + + class AX + + } + + trait B { self: AB => + + type BB = AA + + class BX + } + + class AB extends A with B + +} \ No newline at end of file -- cgit v1.2.3