diff options
author | Martin Odersky <odersky@gmail.com> | 2013-07-08 11:05:55 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-07-11 10:07:32 +0200 |
commit | c9679f6c0f3c8200e1b1f537e89488094cfc2576 (patch) | |
tree | 59f142f2b241049737bfb71838235a4451d40cc1 /src/dotty/tools/dotc/core/pickling/UnPickler.scala | |
parent | 0af96c0f5179104fca02cf1aa144c6176bdb71eb (diff) | |
download | dotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.tar.gz dotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.tar.bz2 dotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.zip |
Added functionality to deal with function applications.
- Added Applications class to represent applications
- Added Constraint class to represent type constraints
- Added TyperState class to represent typer state
- Added Diagnostic class to buffer errors and warnings
- Added Inferencing class that contains some common functionality for type inferencing (this one's still rudimentary).
- Added extractor for FunctionType in Definitions
- Added desugaring of default parameters to default getters in Desugar
- Added flags to deal with default parameters
- Added substitutions that replace bound parameters
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/UnPickler.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/UnPickler.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala index ea42b40a4..24259211a 100644 --- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala +++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala @@ -323,7 +323,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: val owner = if (atEnd) loadingMirror.RootClass else readSymbolRef() def adjust(denot: Denotation) = { - val denot1 = denot.disambiguate(p) + val denot1 = denot.disambiguate(d => p(d.symbol)) val sym = denot1.symbol if (denot.exists && !denot1.exists) { // !!!DEBUG val alts = denot.alternatives map (d => d+":"+d.info+"/"+d.signature) @@ -393,7 +393,15 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: val nameref = readNat() val name0 = at(nameref, readName) val owner = readSymbolRef() - val flags = unpickleScalaFlags(readLongNat(), name0.isTypeName) + + var flags = unpickleScalaFlags(readLongNat(), name0.isTypeName) + if (flags is DefaultParameter) { + // DefaultParameterized flag now on method, not parameter + //assert(flags is Param, s"$name0 in $owner") + flags = flags &~ DefaultParameterized + owner.setFlag(DefaultParameterized) + } + val name = name0.adjustIfModuleClass(flags) def isClassRoot = (name == classRoot.name) && (owner == classRoot.owner) && !(flags is ModuleClass) |