diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-11 00:11:25 +1100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-04 13:29:38 +0200 |
commit | c245600ed4bfd4af6f2b45e8cae2cf5a63ddeaf0 (patch) | |
tree | 8a116622aacd162b206a9dfcacab5db74e3427e8 /compiler/src/dotty/tools/dotc/reporting | |
parent | 8f3c9a80cd464a962abeede37087ed52a6d9970a (diff) | |
download | dotty-c245600ed4bfd4af6f2b45e8cae2cf5a63ddeaf0.tar.gz dotty-c245600ed4bfd4af6f2b45e8cae2cf5a63ddeaf0.tar.bz2 dotty-c245600ed4bfd4af6f2b45e8cae2cf5a63ddeaf0.zip |
More fine-grained distinctions when flags are defined.
Flags like Trait are in fact not always defined when a symbol
is created. For symbols loaded from class files, this flag, and
some other is defined only once the classfile has been loaded.
But this happens in general before the symbol is completed.
We model this distinction by separating from the `FromStartFlags` set
a new set `AfterLoadFlags` and distinguishing between the two sets
in `SymDenotations#is`.
Test case is enum-Option.scala. This erroneously complained before
that `Enum` was not a trait.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/reporting')
-rw-r--r-- | compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala index 57365658e..b0f5f8ab1 100644 --- a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala @@ -238,7 +238,7 @@ object messages { import core.Flags._ val maxDist = 3 val decls = site.decls.flatMap { sym => - if (sym.is(Synthetic | PrivateOrLocal) || sym.isConstructor) Nil + if (sym.flagsUNSAFE.is(Synthetic | PrivateOrLocal) || sym.isConstructor) Nil else List((sym.name.show, sym)) } |