aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-04-18 21:26:31 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-06-07 14:18:27 +0200
commitbbd48d3d52449a379ea31f8619c5f5e5f9f1aaac (patch)
tree2cdf8763a70c7ae9b3b27dbf40aa09249cf8fc25 /src/dotty/tools/dotc/core/SymDenotations.scala
parent7408f144589079ca5d0087e1d9ae3f44c5882f79 (diff)
downloaddotty-bbd48d3d52449a379ea31f8619c5f5e5f9f1aaac.tar.gz
dotty-bbd48d3d52449a379ea31f8619c5f5e5f9f1aaac.tar.bz2
dotty-bbd48d3d52449a379ea31f8619c5f5e5f9f1aaac.zip
SymDenotations: Allow entering Static symbols.
They aren't inherited and can be entered into frozen owners.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index ff99f3b55..586e4db7f 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1499,7 +1499,7 @@ object SymDenotations {
/** Enter a symbol in given `scope` without potentially replacing the old copy. */
def enterNoReplace(sym: Symbol, scope: MutableScope)(implicit ctx: Context): Unit = {
- require((sym.denot.flagsUNSAFE is Private) || !(this is Frozen) || (scope ne this.unforcedDecls))
+ require((sym.denot.flagsUNSAFE is Private) || !(this is Frozen) || (scope ne this.unforcedDecls) || sym.hasAnnotation(defn.ScalaStaticAnnot))
scope.enter(sym)
if (myMemberFingerPrint != FingerPrint.unknown)