Skip to content

Commit b54537f

Browse files
Fix inline-t2425.scala by removing partial pattern matching
1 parent acb9b8f commit b54537f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ class Inliner(call: tpd.Tree, rhs: tpd.Tree)(implicit ctx: Context) {
457457
paramProxy.get(tree.tpe) match {
458458
case Some(t: SingletonType) if tree.isTerm => singleton(t).withPos(tree.pos)
459459
case Some(t) if tree.isType => TypeTree(t).withPos(tree.pos)
460-
case None => tree
460+
case _ => tree
461461
}
462462
case _ => tree
463463
}}

tests/pos/inline-t2425.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object Test extends App {
2+
inline def foo[T](bar: T) = {
3+
bar match {
4+
case _ => ()
5+
}
6+
}
7+
foo(Array(1, 2))
8+
}

0 commit comments

Comments
 (0)