Skip to content

Commit 841a676

Browse files
committed
Waiting for named fields
One would like to write ``` case tp @ ClassInfo(cls = cls) => ```
1 parent 6756c41 commit 841a676

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6048,7 +6048,8 @@ object Types extends TypeUtils {
60486048
end samParent
60496049

60506050
def samClass(tp: Type)(using Context): Symbol = tp match
6051-
case tp @ ClassInfo(_, cls, _, _, _) =>
6051+
case tp: ClassInfo =>
6052+
val cls = tp.cls
60526053
def takesNoArgs(tp: Type) =
60536054
!tp.classSymbol.primaryConstructor.exists
60546055
// e.g. `ContextFunctionN` does not have constructors

0 commit comments

Comments
 (0)