File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import dotty.tools.dotc.core.Definitions
2727import dotty .tools .dotc .core .Types .ConstantType
2828import dotty .tools .dotc .core .NameKinds .WildcardParamName
2929import dotty .tools .dotc .core .Types .TermRef
30+ import dotty .tools .dotc .core .Types .NameFilter
3031
3132
3233
@@ -326,9 +327,10 @@ object CheckUnused:
326327 */
327328 def registerUsed (sym : Symbol , name : Option [Name ])(using Context ): Unit =
328329 if ! isConstructorOfSynth(sym) && ! doNotRegister(sym) then
329- usedInScope.top += ((sym, sym.isAccessibleAsIdent, name))
330330 if sym.isConstructor && sym.exists then
331331 registerUsed(sym.owner, None ) // constructor are "implicitly" imported with the class
332+ else
333+ usedInScope.top += ((sym, sym.isAccessibleAsIdent, name))
332334
333335 /** Register a symbol that should be ignored */
334336 def addIgnoredUsage (sym : Symbol )(using Context ): Unit =
You can’t perform that action at this time.
0 commit comments