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
27
27
import dotty .tools .dotc .core .Types .ConstantType
28
28
import dotty .tools .dotc .core .NameKinds .WildcardParamName
29
29
import dotty .tools .dotc .core .Types .TermRef
30
+ import dotty .tools .dotc .core .Types .NameFilter
30
31
31
32
32
33
@@ -326,9 +327,10 @@ object CheckUnused:
326
327
*/
327
328
def registerUsed (sym : Symbol , name : Option [Name ])(using Context ): Unit =
328
329
if ! isConstructorOfSynth(sym) && ! doNotRegister(sym) then
329
- usedInScope.top += ((sym, sym.isAccessibleAsIdent, name))
330
330
if sym.isConstructor && sym.exists then
331
331
registerUsed(sym.owner, None ) // constructor are "implicitly" imported with the class
332
+ else
333
+ usedInScope.top += ((sym, sym.isAccessibleAsIdent, name))
332
334
333
335
/** Register a symbol that should be ignored */
334
336
def addIgnoredUsage (sym : Symbol )(using Context ): Unit =
You can’t perform that action at this time.
0 commit comments