summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-02 22:27:44 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-02 22:27:44 +1000
commit54c720e91f098c70158457ea7d6bb97d48653519 (patch)
treeea0035d9a3e81cd7bd860efe53a6f360038fa277 /src/reflect
parentee916cc789ee89de7ae75bf1b86f960714c8e5e2 (diff)
parentbfa79972e4005f29fa997483c7f96f69ec5fdbc9 (diff)
downloadscala-54c720e91f098c70158457ea7d6bb97d48653519.tar.gz
scala-54c720e91f098c70158457ea7d6bb97d48653519.tar.bz2
scala-54c720e91f098c70158457ea7d6bb97d48653519.zip
Merge pull request #4043 from retronym/ticket/3439-2
SI-3439 Fix use of implicit constructor params in super call
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 70fb9dfa8e..51f06b1d6d 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -2154,6 +2154,12 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
if (isClass) this else moduleClass
} else owner.enclosingTopLevelClass
+ /** The top-level class or local dummy symbol containing this symbol. */
+ def enclosingTopLevelClassOrDummy: Symbol =
+ if (isTopLevel) {
+ if (isClass) this else moduleClass.orElse(this)
+ } else owner.enclosingTopLevelClassOrDummy
+
/** Is this symbol defined in the same scope and compilation unit as `that` symbol? */
def isCoDefinedWith(that: Symbol) = (
!rawInfoIsNoType
@@ -3502,6 +3508,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
override def enclClassChain = Nil
override def enclClass: Symbol = this
override def enclosingTopLevelClass: Symbol = this
+ override def enclosingTopLevelClassOrDummy: Symbol = this
override def enclosingPackageClass: Symbol = this
override def enclMethod: Symbol = this
override def associatedFile = NoAbstractFile