summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/internal/Types.scala11
-rw-r--r--src/compiler/scala/tools/nsc/ToolBoxes.scala3
2 files changed, 10 insertions, 4 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala
index 2fe7dfda17..c049df47af 100644
--- a/src/compiler/scala/reflect/internal/Types.scala
+++ b/src/compiler/scala/reflect/internal/Types.scala
@@ -4832,9 +4832,14 @@ trait Types extends api.Types { self: SymbolTable =>
if (sym.isPackage) tp
else {
val pre1 = this(pre)
- val sym1 = adaptToNewRun(pre1, sym)
- if ((pre1 eq pre) && (sym1 eq sym)) tp
- else singleType(pre1, sym1)
+ try {
+ val sym1 = adaptToNewRun(pre1, sym)
+ if ((pre1 eq pre) && (sym1 eq sym)) tp
+ else singleType(pre1, sym1)
+ } catch {
+ case _: MissingTypeControl =>
+ tp
+ }
}
case TypeRef(pre, sym, args) =>
if (sym.isPackageClass) tp
diff --git a/src/compiler/scala/tools/nsc/ToolBoxes.scala b/src/compiler/scala/tools/nsc/ToolBoxes.scala
index 5b2b5ff5e9..8bf977090b 100644
--- a/src/compiler/scala/tools/nsc/ToolBoxes.scala
+++ b/src/compiler/scala/tools/nsc/ToolBoxes.scala
@@ -39,7 +39,8 @@ trait ToolBoxes { self: Global =>
def runExpr(tree0: Tree, freeTypes: Map[FreeType, Type] = Map[FreeType, Type]()): Any = {
var tree = substituteFreeTypes(tree0, freeTypes)
// need to reset the tree, otherwise toolbox will refuse to work with it
- tree = resetAllAttrs(tree0.duplicate)
+ // upd. this has to be done by the user himself, otherwise we run into troubles. see SI-5713
+// tree = resetAllAttrs(tree0.duplicate)
val imported = importer.importTree(tree)
val toolBox = libraryClasspathMirror.mkToolBox(frontEnd.asInstanceOf[libraryClasspathMirror.FrontEnd], options)
try toolBox.runExpr(imported)