diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-29 17:16:48 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-29 19:09:06 -0700 |
commit | 94c63f5da548996535cad43142758c9405118828 (patch) | |
tree | c888993eb3120cbc6e1e4acc45023d941f5bb4e6 /src/compiler/scala/reflect/internal/Symbols.scala | |
parent | e6d5d22d280909dacf635a0a2398158a1b1a6ae1 (diff) | |
download | scala-94c63f5da548996535cad43142758c9405118828.tar.gz scala-94c63f5da548996535cad43142758c9405118828.tar.bz2 scala-94c63f5da548996535cad43142758c9405118828.zip |
Fighting bitrot with typing.
if (false && settings.debug.value) { ... }
Date: 7 years ago
*** empty log message ***
That's way past the sell-by date for 'if (false && condition)'.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Symbols.scala')
-rw-r--r-- | src/compiler/scala/reflect/internal/Symbols.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala index 37caa06fe9..c2ef633d58 100644 --- a/src/compiler/scala/reflect/internal/Symbols.scala +++ b/src/compiler/scala/reflect/internal/Symbols.scala @@ -1425,7 +1425,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => /** Reset symbol to initial state */ - def reset(completer: Type) { + def reset(completer: Type): this.type = { resetFlags() infos = null _validTo = NoPeriod @@ -2054,6 +2054,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => def sealedDescendants: Set[Symbol] = children.flatMap(_.sealedDescendants) + this @inline final def orElse(alt: => Symbol): Symbol = if (this ne NoSymbol) this else alt + @inline final def andAlso(f: Symbol => Unit): Symbol = if (this eq NoSymbol) NoSymbol else { f(this) ; this } // ------ toString ------------------------------------------------------------------- @@ -2636,10 +2637,11 @@ trait Symbols extends api.Symbols { self: SymbolTable => info.baseTypeIndex(that) >= 0 ) - override def reset(completer: Type) { + override def reset(completer: Type): this.type = { super.reset(completer) tpePeriod = NoPeriod tyconRunId = NoRunId + this } /*** example: @@ -2822,9 +2824,10 @@ trait Symbols extends api.Symbols { self: SymbolTable => else super.sourceFile override def sourceFile_=(f: AbstractFileType) { source = f } - override def reset(completer: Type) { + override def reset(completer: Type): this.type = { super.reset(completer) thissym = this + this } /** the type this.type in this class */ @@ -3022,7 +3025,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => override def ownerChain: List[Symbol] = List() override def ownersIterator: Iterator[Symbol] = Iterator.empty override def alternatives: List[Symbol] = List() - override def reset(completer: Type) {} + override def reset(completer: Type): this.type = this override def info: Type = NoType override def existentialBound: Type = NoType override def rawInfo: Type = NoType |