Skip to content

Commit 925c3c7

Browse files
committed
Drop HigherKinded flag
1 parent 85bf06c commit 925c3c7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class ExtractSemanticDB extends Phase:
9999

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

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ class Namer { typer: Typer =>
401401
case _: TypeBoundsTree | _: MatchTypeTree =>
402402
flags |= Deferred // Typedefs with Match rhs classify as abstract
403403
case LambdaTypeTree(_, body) =>
404-
flags |= HigherKinded
405404
analyzeRHS(body)
406405
case _ =>
407406
if rhs.isEmpty || flags.is(Opaque) then flags |= Deferred

0 commit comments

Comments
 (0)