aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-29 11:27:05 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-01 15:04:44 +0200
commit31a7f6492729ad1ddf7f8e233a452a6ccd517af5 (patch)
tree8ae15ccc33fb0dd5e5c6fb98f010820cdc9a678e /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f (diff)
downloaddotty-31a7f6492729ad1ddf7f8e233a452a6ccd517af5.tar.gz
dotty-31a7f6492729ad1ddf7f8e233a452a6ccd517af5.tar.bz2
dotty-31a7f6492729ad1ddf7f8e233a452a6ccd517af5.zip
New utility method tpd.Underscore
A typed `_'. This is needed in a few places.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 507dbb0ce..5fa17921f 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -60,7 +60,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
val sel = Ident(selector.termRef).withPos(tree.pos)
val rethrow = tpd.CaseDef(EmptyTree, EmptyTree, Throw(ref(selector)))
val newCases = tpd.CaseDef(
- Bind(selector,untpd.Ident(nme.WILDCARD).withPos(tree.pos).withType(selector.info)),
+ Bind(selector, Underscore(selector.info).withPos(tree.pos)),
EmptyTree,
transformMatch(tpd.Match(sel, tree.cases ::: rethrow :: Nil)))
cpy.Try(tree)(tree.expr, newCases :: Nil, tree.finalizer)