Skip to content

Commit

Permalink
Drop HigherKinded flag
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Jun 9, 2020
1 parent 2509450 commit 86bd4e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/core/Flags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ object Flags {
/** Labeled with `final` modifier */
val (Final @ _, _, _) = newFlags(6, "final")

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

/** A (term or type) parameter to a class or method */
val (Param @ _, TermParam @ _, TypeParam @ _) = newFlags(8, "<param>")
Expand Down Expand Up @@ -439,7 +439,7 @@ object Flags {
*/
val FromStartFlags: FlagSet = commonFlags(
Module, Package, Deferred, Method, Case, Enum,
HigherKinded, Param, ParamAccessor,
SuperTrait, Param, ParamAccessor,
Scala2SpecialFlags, MutableOrOpen, Opaque, Touched, JavaStatic,
OuterOrCovariant, LabelOrContravariant, CaseAccessor,
Extension, NonMember, Implicit, Given, Permanent, Synthetic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class ExtractSemanticDB extends Phase:

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

/** Uses of this symbol where the reference has given span should be excluded from semanticdb */
private def excludeUse(qualifier: Option[Symbol], sym: Symbol)(using Context): Boolean =
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/typer/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ class Namer { typer: Typer =>
case _: TypeBoundsTree | _: MatchTypeTree =>
flags |= Deferred // Typedefs with Match rhs classify as abstract
case LambdaTypeTree(_, body) =>
flags |= HigherKinded
analyzeRHS(body)
case _ =>
if rhs.isEmpty || flags.is(Opaque) then flags |= Deferred
Expand Down

0 comments on commit 86bd4e9

Please sign in to comment.