aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-05 15:43:53 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-05 15:43:53 +0100
commitf532c9acb9aef9a93f52109c320ea5c944de46bc (patch)
treeaecf4c0c236cad2cb082eeddc11bda83146785f9
parenta55a2607c7376ed81141ef958d6a8eeaeea8fd72 (diff)
downloaddotty-f532c9acb9aef9a93f52109c320ea5c944de46bc.tar.gz
dotty-f532c9acb9aef9a93f52109c320ea5c944de46bc.tar.bz2
dotty-f532c9acb9aef9a93f52109c320ea5c944de46bc.zip
Fix #1643: Avoid crash due to previous errors
We assumed that argument types in an untpd.New are never wildcards but in the face of errors that is not true.
-rw-r--r--src/dotty/tools/dotc/ast/untpd.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/untpd.scala b/src/dotty/tools/dotc/ast/untpd.scala
index ac3beaff4..f259bdc57 100644
--- a/src/dotty/tools/dotc/ast/untpd.scala
+++ b/src/dotty/tools/dotc/ast/untpd.scala
@@ -282,7 +282,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
case TypedSplice(AppliedTypeTree(tycon, targs)) =>
(TypedSplice(tycon), targs map (TypedSplice(_)))
case TypedSplice(tpt1: Tree) =>
- val argTypes = tpt1.tpe.argTypes
+ val argTypes = tpt1.tpe.argTypesLo
val tycon = tpt1.tpe.withoutArgs(argTypes)
def wrap(tpe: Type) = TypeTree(tpe) withPos tpt.pos
(wrap(tycon), argTypes map wrap)