Skip to content

Commit 8fa14e5

Browse files
committed
Supress false-positive match exhastivity warning
1 parent 99dd85d commit 8fa14e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1104,13 +1104,14 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
11041104
// transform the `Ident` into a `Select` to ensure that the prefix
11051105
// is retained with a `TypedSplice` (see `case Select` bellow).
11061106
// See tests/pos/i18713.scala for an example.
1107-
fn.tpe match
1107+
(fn.tpe match
11081108
case TermRef(qual: TermRef, _) =>
11091109
toSetter(ref(qual).select(fn.symbol).withSpan(fn.span))
11101110
case TermRef(qual: ThisType, _) =>
11111111
toSetter(This(qual.cls).select(fn.symbol).withSpan(fn.span))
11121112
case TermRef(NoPrefix, _) =>
11131113
untpd.cpy.Ident(fn)(name.setterName)
1114+
): @annotation.nowarn // false-positive match exhastivity warning
11141115
case fn @ Select(qual, name: TermName) =>
11151116
untpd.cpy.Select(fn)(untpd.TypedSplice(qual), name.setterName)
11161117
case fn @ TypeApply(fn1, targs) =>

0 commit comments

Comments
 (0)