diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-27 15:28:03 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-12-16 13:14:59 +0100 |
commit | 9c8976ddc62a5d152adc3ffef92309aec8e292e7 (patch) | |
tree | cf193b6129d36b7a0a7f545ed914926b5f6e2844 /src/dotty | |
parent | 4b948aab11102a59e5224a3b8b1078d6d0e35e0e (diff) | |
download | dotty-9c8976ddc62a5d152adc3ffef92309aec8e292e7.tar.gz dotty-9c8976ddc62a5d152adc3ffef92309aec8e292e7.tar.bz2 dotty-9c8976ddc62a5d152adc3ffef92309aec8e292e7.zip |
Hack ClassFileParser to not treat Null$ or Nothing$ as modules.
They are classes.
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/core/StdNames.scala | 3 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala index 24e948fa9..04bcf616d 100644 --- a/src/dotty/tools/dotc/core/StdNames.scala +++ b/src/dotty/tools/dotc/core/StdNames.scala @@ -510,6 +510,9 @@ object StdNames { val wrap: N = "wrap" val zero: N = "zero" val zip: N = "zip" + val nothingRuntimeClass: N = "scala.runtime.Nothing$" + val nullRuntimeClass: N = "scala.runtime.Null$" + val synthSwitch: N = "$synthSwitch" diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index f92573d22..fcdc28b5b 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -875,7 +875,9 @@ class ClassfileParser( val start = starts(index) if (in.buf(start).toInt != CONSTANT_CLASS) errorBadTag(start) val name = getExternalName(in.getChar(start + 1)) - if (name.isModuleClassName) c = ctx.requiredModule(name.sourceModuleName) + if (name.isModuleClassName && (name ne nme.nothingRuntimeClass) && (name ne nme.nullRuntimeClass)) + // Null$ and Nothing$ ARE classes + c = ctx.requiredModule(name.sourceModuleName) else c = classNameToSymbol(name) values(index) = c } |