File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
compiler/src/dotty/tools/dotc/util Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import core.Constants.Constant
77import core .Contexts ._
88import core .Denotations .SingleDenotation
99import core .Flags
10+ import core .NameOps .isUnapplyName
1011import core .Names ._
1112import core .Types ._
1213import util .Spans .Span
@@ -159,14 +160,6 @@ object Signatures {
159160 params :: rest
160161 }
161162
162- /**
163- * This function is a hack which allows Signatures API to remain unchanged
164- *
165- * @return true if denot is "unapply" or "unapplySeq", false otherwise
166- */
167- def isUnapplyDenotation : Boolean =
168- List (core.Names .termName(" unapply" ), core.Names .termName(" unapplySeq" )) contains denot.name
169-
170163 def extractParamNamess (resultType : Type ): List [List [Name ]] =
171164 if resultType.typeSymbol.flags.is(Flags .CaseClass ) && symbol.flags.is(Flags .Synthetic ) then
172165 resultType.typeSymbol.primaryConstructor.paramInfo.paramNamess
@@ -189,7 +182,7 @@ object Signatures {
189182 }
190183
191184 denot.info.stripPoly match {
192- case tpe if isUnapplyDenotation =>
185+ case tpe if denot.name.isUnapplyName =>
193186 val params = toUnapplyParamss(tpe)
194187 if params.nonEmpty then
195188 Some (Signature (" " , Nil , List (params), None ))
You can’t perform that action at this time.
0 commit comments