Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SI-7345 Exploit named/default args

  - Collapse overloads of `rootContext`
  - make `atOwner` more concise
  • Loading branch information...
commit 190aea9f015280d0f48cc2928515d11eccce4e33 1 parent c9f5ab0
@retronym retronym authored
View
4 src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -86,9 +86,7 @@ trait Contexts { self: Analyzer =>
else RootImports.completeList
}
- def rootContext(unit: CompilationUnit): Context = rootContext(unit, EmptyTree, erasedTypes = false)
- def rootContext(unit: CompilationUnit, tree: Tree): Context = rootContext(unit, tree, erasedTypes = false)
- def rootContext(unit: CompilationUnit, tree: Tree, erasedTypes: Boolean): Context = {
+ def rootContext(unit: CompilationUnit, tree: Tree = EmptyTree, erasedTypes: Boolean = false): Context = {
var sc = startContext
for (sym <- rootImports(unit)) {
sc = sc.makeNewImport(gen.mkWildcardImport(sym))
View
2  src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -5292,7 +5292,7 @@ trait Typers extends Adaptations with Tags {
}
def atOwner(owner: Symbol): Typer =
- newTyper(context.make(context.tree, owner))
+ newTyper(context.make(owner = owner))
def atOwner(tree: Tree, owner: Symbol): Typer =
newTyper(context.make(tree, owner))
Please sign in to comment.
Something went wrong with that request. Please try again.