diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-02 13:29:55 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-02 13:30:00 +0100 |
commit | 4d1213579885144ebb9653007e64065ff4a62e2e (patch) | |
tree | c5532ffdb66c37cb2285d87f80b40e522a56f1a5 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | e9d1319273f9353a6f2c877ebb9a8dc8823008a7 (diff) | |
download | dotty-4d1213579885144ebb9653007e64065ff4a62e2e.tar.gz dotty-4d1213579885144ebb9653007e64065ff4a62e2e.tar.bz2 dotty-4d1213579885144ebb9653007e64065ff4a62e2e.zip |
Fix checking for disabled root imports
Needs to be done always when hitting a wildcard import, not just when something was found
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 2f5d1522b..9ae8252a1 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -283,9 +283,9 @@ class Typer extends Namer with Applications with Implicits { * from given import info */ def wildImportRef(imp: ImportInfo): Type = { - if (imp.isWildcardImport && !(imp.excluded contains name.toTermName)) { + if (imp.isWildcardImport) { val pre = imp.site - if (!isDisabled(imp, pre)) { + if (!isDisabled(imp, pre) && !(imp.excluded contains name.toTermName)) { val denot = pre.member(name) if (reallyExists(denot)) return pre.select(name, denot) } @@ -1024,7 +1024,7 @@ class Typer extends Namer with Applications with Implicits { } } - def typed(tree: untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): Tree = ctx.traceIndented (s"typing ${tree.show}", typr, show = true) { + def typed(tree: untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): Tree = /*>|>*/ ctx.traceIndented (s"typing ${tree.show}", typr, show = true) /*<|<*/ { if (!tree.isEmpty && ctx.typerState.isGlobalCommittable) assert(tree.pos.exists, tree) try adapt(typedUnadapted(tree, pt), pt) catch { @@ -1090,8 +1090,8 @@ class Typer extends Namer with Applications with Implicits { fallBack } - def adapt(tree: Tree, pt: Type)(implicit ctx: Context) = track("adapt") { - ctx.traceIndented(i"adapting $tree of type ${tree.tpe} to $pt", typr, show = true) { + def adapt(tree: Tree, pt: Type)(implicit ctx: Context) = /*>|>*/ track("adapt") /*<|<*/ { + /*>|>*/ ctx.traceIndented(i"adapting $tree of type ${tree.tpe} to $pt", typr, show = true) /*<|<*/ { interpolateUndetVars(tree) tree overwriteType tree.tpe.simplified adaptInterpolated(tree, pt) |