Skip to content

Commit 06dbeae

Browse files
committed
Drop unused HigherKinded flag
Re-use the slot for `TypeMethod` (currently neither used nor set)
1 parent f64241c commit 06dbeae

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ object Flags {
223223

224224
/** A method symbol. */
225225
final val Method = termFlag(7, "<method>")
226-
final val HigherKinded = typeFlag(7, "<higher kinded>")
226+
final val TypeMethod = typeFlag(7, "<type method>")
227227

228228
/** A (term or type) parameter to a class or method */
229229
final val Param = commonFlag(8, "<param>")
@@ -456,7 +456,7 @@ object Flags {
456456
/** Flags that are not (re)set when completing the denotation */
457457
final val FromStartFlags =
458458
Module | Package | Deferred | Method.toCommonFlags |
459-
HigherKinded.toCommonFlags | Param | ParamAccessor.toCommonFlags |
459+
Param | ParamAccessor.toCommonFlags |
460460
Scala2ExistentialCommon | Mutable.toCommonFlags | Touched | JavaStatic |
461461
CovariantOrOuter | ContravariantOrLabel | CaseAccessor.toCommonFlags |
462462
NonMember | ImplicitCommon | Permanent | Synthetic |

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,6 @@ class Namer { typer: Typer =>
342342
val isDeferred = lacksDefinition(tree)
343343
val deferred = if (isDeferred) Deferred else EmptyFlags
344344
val method = if (tree.isInstanceOf[DefDef]) Method else EmptyFlags
345-
val higherKinded = tree match {
346-
case TypeDef(_, LambdaTypeTree(_, _)) if isDeferred => HigherKinded
347-
case _ => EmptyFlags
348-
}
349345

350346
// to complete a constructor, move one context further out -- this
351347
// is the context enclosing the class. Note that the context in which a
@@ -363,7 +359,7 @@ class Namer { typer: Typer =>
363359
case _ => new Completer(tree)(cctx)
364360
}
365361
val info = adjustIfModule(completer, tree)
366-
createOrRefine[Symbol](tree, name, flags | deferred | method | higherKinded,
362+
createOrRefine[Symbol](tree, name, flags | deferred | method,
367363
_ => info,
368364
(fs, _, pwithin) => ctx.newSymbol(ctx.owner, name, fs, info, pwithin, tree.namePos))
369365
case tree: Import =>

0 commit comments

Comments
 (0)