Skip to content

Commit 86bd4e9

Browse files
committed
Drop HigherKinded flag
1 parent 2509450 commit 86bd4e9

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

compiler/src/dotty/tools/dotc/core/Flags.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ object Flags {
222222
/** Labeled with `final` modifier */
223223
val (Final @ _, _, _) = newFlags(6, "final")
224224

225-
/** A method symbol */
226-
val (_, Method @ _, HigherKinded @ _) = newFlags(7, "<method>", "<higher kinded>") // TODO drop HigherKinded
225+
/** A method symbol / a super trait */
226+
val (_, Method @ _, SuperTrait @ _) = newFlags(7, "<method>", "super")
227227

228228
/** A (term or type) parameter to a class or method */
229229
val (Param @ _, TermParam @ _, TypeParam @ _) = newFlags(8, "<param>")
@@ -439,7 +439,7 @@ object Flags {
439439
*/
440440
val FromStartFlags: FlagSet = commonFlags(
441441
Module, Package, Deferred, Method, Case, Enum,
442-
HigherKinded, Param, ParamAccessor,
442+
SuperTrait, Param, ParamAccessor,
443443
Scala2SpecialFlags, MutableOrOpen, Opaque, Touched, JavaStatic,
444444
OuterOrCovariant, LabelOrContravariant, CaseAccessor,
445445
Extension, NonMember, Implicit, Given, Permanent, Synthetic,

compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ExtractSemanticDB extends Phase:
100100

101101
private def excludeChildren(sym: Symbol)(using Context): Boolean =
102102
!sym.exists
103-
|| sym.isAllOf(HigherKinded | Param)
103+
|| sym.is(Param) && sym.info.bounds.hi.isInstanceOf[Types.HKTypeLambda]
104104

105105
/** Uses of this symbol where the reference has given span should be excluded from semanticdb */
106106
private def excludeUse(qualifier: Option[Symbol], sym: Symbol)(using Context): Boolean =

compiler/src/dotty/tools/dotc/typer/Namer.scala

-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ class Namer { typer: Typer =>
404404
case _: TypeBoundsTree | _: MatchTypeTree =>
405405
flags |= Deferred // Typedefs with Match rhs classify as abstract
406406
case LambdaTypeTree(_, body) =>
407-
flags |= HigherKinded
408407
analyzeRHS(body)
409408
case _ =>
410409
if rhs.isEmpty || flags.is(Opaque) then flags |= Deferred

0 commit comments

Comments
 (0)