File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -572,7 +572,7 @@ object CheckUnused:
572572
573573 // does the param have an alias in a default arg method that is used?
574574 def usedByDefaultGetter (param : Symbol , meth : Symbol ): Boolean =
575- val cls = if meth.isPrimaryConstructor then meth.enclosingClass.companionModule else meth.enclosingClass
575+ val cls = if meth.isConstructor then meth.enclosingClass.companionModule else meth.enclosingClass
576576 val MethName = meth.name
577577 cls.info.decls.exists: d =>
578578 d.name match
Original file line number Diff line number Diff line change @@ -24,3 +24,7 @@ class K(k: Int)(s: String = "*"*k):
2424
2525class KU (using k : Int )(s : String = " *" * k):
2626 override val toString = s
27+
28+ class KK (s : String ):
29+ def this (k : Int )(s : String = " *" * k) = this (s)
30+ override val toString = s
You can’t perform that action at this time.
0 commit comments