diff options
author | Martin Odersky <odersky@gmail.com> | 2016-11-05 15:01:28 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-11-05 15:01:36 +0100 |
commit | 9c821cb83ce6b6f566620432ef3b5d70f54c67d2 (patch) | |
tree | 323cecc1274e786ab66a9c2dc9c75d1dc81c2d8b /src/dotty/tools/dotc/typer/Applications.scala | |
parent | a55a2607c7376ed81141ef958d6a8eeaeea8fd72 (diff) | |
download | dotty-9c821cb83ce6b6f566620432ef3b5d70f54c67d2.tar.gz dotty-9c821cb83ce6b6f566620432ef3b5d70f54c67d2.tar.bz2 dotty-9c821cb83ce6b6f566620432ef3b5d70f54c67d2.zip |
Fix #1640: Avoid applications with untyped function parts
Avoid applications with untyped function parts even if program is erroneous.
Taking the symbol fails for these applications, which can cause crashes.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 56595a637..6c398cd72 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -591,7 +591,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => } fun1.tpe match { - case ErrorType => tree.withType(ErrorType) + case ErrorType => untpd.cpy.Apply(tree)(fun1, tree.args).withType(ErrorType) case TryDynamicCallType => typedDynamicApply(tree, pt) case _ => tryEither { |