aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-12-18 15:44:03 +0100
committerGitHub <noreply@github.com>2016-12-18 15:44:03 +0100
commit18b8daa30916b2efaa59638c21198d401a67e46a (patch)
tree09c1a3be43132c89f84605f78429d0094e8749e6 /compiler/src/dotty/tools/dotc/typer/Applications.scala
parent5df985cc599a0c69029773e3416bbb5fc883476a (diff)
parent1f9990b58c23ba74a8d96166700e755704b78a49 (diff)
downloaddotty-18b8daa30916b2efaa59638c21198d401a67e46a.tar.gz
dotty-18b8daa30916b2efaa59638c21198d401a67e46a.tar.bz2
dotty-18b8daa30916b2efaa59638c21198d401a67e46a.zip
Merge pull request #1817 from dotty-staging/fix-#1802
Fix #1802: Make sure errors are not swept under the carpet
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Applications.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala
index 4203ab9b2..da0a59c7b 100644
--- a/compiler/src/dotty/tools/dotc/typer/Applications.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -561,7 +561,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
var typedArgs = typedArgBuf.toList
def app0 = cpy.Apply(app)(normalizedFun, typedArgs) // needs to be a `def` because typedArgs can change later
val app1 =
- if (!success) app0.withType(ErrorType)
+ if (!success) app0.withType(UnspecifiedErrorType)
else {
if (!sameSeq(args, orderedArgs)) {
// need to lift arguments to maintain evaluation order in the
@@ -654,7 +654,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
}
fun1.tpe match {
- case ErrorType => untpd.cpy.Apply(tree)(fun1, tree.args).withType(ErrorType)
+ case err: ErrorType => untpd.cpy.Apply(tree)(fun1, tree.args).withType(err)
case TryDynamicCallType => typedDynamicApply(tree, pt)
case _ =>
tryEither {
@@ -918,7 +918,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
case tp =>
val unapplyErr = if (tp.isError) unapplyFn else notAnExtractor(unapplyFn)
val typedArgsErr = args mapconserve (typed(_, defn.AnyType))
- cpy.UnApply(tree)(unapplyErr, Nil, typedArgsErr) withType ErrorType
+ cpy.UnApply(tree)(unapplyErr, Nil, typedArgsErr) withType unapplyErr.tpe
}
}