Skip to content

Commit 4b75df5

Browse files
committed
Trial: more strict rules for singleton values as patterns
1 parent bba1db8 commit 4b75df5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3808,8 +3808,7 @@ class Typer extends Namer
38083808
mapOver(tp)
38093809
}
38103810

3811-
if tree.symbol.isOneOf(Module | Enum)
3812-
&& !(tree.tpe frozen_<:< pt) // fast track
3811+
if !(tree.tpe frozen_<:< pt) // fast track
38133812
&& !(tree.tpe frozen_<:< approx(pt))
38143813
then
38153814
// We could check whether `equals` is overriden.

0 commit comments

Comments
 (0)