From 543ff7f4123ded7172fd6ede59f09945efd7c158 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 25 Sep 2014 13:25:06 +0200 Subject: Make changeOwner more robust regarding non-standard owner chains The problem is running changeOwner(from, to) where - from is a ValDef or a Label - an embedded definition has as owner not `from` but some owner of `from`. We allow such denomrlaized owners and the pattern matcher generates them. This patch makes changeOwner take these situations into account. --- src/dotty/tools/dotc/core/Flags.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/dotty/tools/dotc/core/Flags.scala') diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala index 896de25fd..e34483f8f 100644 --- a/src/dotty/tools/dotc/core/Flags.scala +++ b/src/dotty/tools/dotc/core/Flags.scala @@ -501,6 +501,9 @@ object Flags { /** Either mutable or lazy */ final val MutableOrLazy = Mutable | Lazy + /** Either method or lazy */ + final val MethodOrLazy = Method | Lazy + /** Labeled `private` or `final` */ final val PrivateOrFinal = Private | Final -- cgit v1.2.3