From 6f7bd990ae69d6796c68894133c1975bef354e12 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Fri, 19 Aug 2016 20:01:38 -0700 Subject: Ensure access from subclass to trait lazy val Since we need to refer to a trait lazy val's accessor using a super call in a subclass (when the field and bitmap are added), we must ensure that access is allowed. If the lazy val has an access boundary (e.g., `private[somePkg]`), make sure the `PROTECTED` flag is set, which widens access to `protected[somePkg]`. (As `member.hasAccessBoundary` implies `!member.hasFlag(PRIVATE)`, we don't have to `resetFlag PRIVATE`.) --- test/files/pos/trait_lazy_accessboundary.scala | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test/files/pos/trait_lazy_accessboundary.scala (limited to 'test/files') diff --git a/test/files/pos/trait_lazy_accessboundary.scala b/test/files/pos/trait_lazy_accessboundary.scala new file mode 100644 index 0000000000..6529816ffb --- /dev/null +++ b/test/files/pos/trait_lazy_accessboundary.scala @@ -0,0 +1,2 @@ +package foo { trait HasLazy { private[foo] lazy val myLazy = "my lady" } } +package bar { class MixInSuperLazy extends foo.HasLazy } -- cgit v1.2.3