From 09dbf3f148b0dc04e10dd50ed2aa626c26afaeec Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 25 May 2015 22:15:43 +1000 Subject: SI-9326 Fix regression with existentials in parent types The typechecker rewrites `p.foo` to `p..foo` if `foo` must come from a package object. This logic was overhauled in 51745c06f3, but this caused a regression. I reverted to the predecessor of that commit to see how things worked before. The lookup of the name `X` bound to the existential quantifier, but incorrectly included the prefix `test.type` in the result of the lookup. However, the subsequent call to `isInPackageObject` (from `makeAccessible`) returned false, so we didn't try to rewrite `X` to `test..X`. This commit makes a minimal fix that makes `isInPackageObject` return false for existentials. --- test/files/pos/t9326a.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/pos/t9326a.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t9326a.scala b/test/files/pos/t9326a.scala new file mode 100644 index 0000000000..aefc735585 --- /dev/null +++ b/test/files/pos/t9326a.scala @@ -0,0 +1,6 @@ +package p + +trait M[A] + +class C extends M[Tuple1[X] forSome { type X }] + -- cgit v1.2.3