File tree 1 file changed +2
-9
lines changed
compiler/src/dotty/tools/dotc/util 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
7
7
import core .Contexts ._
8
8
import core .Denotations .SingleDenotation
9
9
import core .Flags
10
+ import core .NameOps .isUnapplyName
10
11
import core .Names ._
11
12
import core .Types ._
12
13
import util .Spans .Span
@@ -159,14 +160,6 @@ object Signatures {
159
160
params :: rest
160
161
}
161
162
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
-
170
163
def extractParamNamess (resultType : Type ): List [List [Name ]] =
171
164
if resultType.typeSymbol.flags.is(Flags .CaseClass ) && symbol.flags.is(Flags .Synthetic ) then
172
165
resultType.typeSymbol.primaryConstructor.paramInfo.paramNamess
@@ -189,7 +182,7 @@ object Signatures {
189
182
}
190
183
191
184
denot.info.stripPoly match {
192
- case tpe if isUnapplyDenotation =>
185
+ case tpe if denot.name.isUnapplyName =>
193
186
val params = toUnapplyParamss(tpe)
194
187
if params.nonEmpty then
195
188
Some (Signature (" " , Nil , List (params), None ))
You can’t perform that action at this time.
0 commit comments