aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 5e56d9eb8..64f44ee5e 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -19,7 +19,6 @@ import ErrorReporting._
import Trees._
import Names._
import StdNames._
-import Constants._
import Inferencing._
import EtaExpansion._
import collection.mutable
@@ -538,8 +537,7 @@ trait Applications extends Compatibility { self: Typer =>
errorTree(tree, s"${qual.show} cannot be used as an extractor in a pattern because it lacks an unapply or unapplySeq method")
val unapply = {
- val dummyArg = untpd.TypedSplice(dummyTreeOfType(WildcardType))
- val unappProto = FunProto(dummyArg :: Nil, WildcardType, this)
+ val unappProto = new UnapplyFunProto(this)
tryEither {
implicit ctx => typedExpr(untpd.Select(qual, nme.unapply), unappProto)
} {
@@ -755,9 +753,6 @@ trait Applications extends Compatibility { self: Typer =>
}
}
- private lazy val dummyTree = untpd.Literal(Constant(null))
- def dummyTreeOfType(tp: Type): Tree = dummyTree withTypeUnchecked tp
-
/** Resolve overloaded alternative `alts`, given expected type `pt`.
* todo: use techniques like for implicits to pick candidates quickly?
*/