Skip to content

Commit 3819693

Browse files
committed
Fix printing of type lambdas
The previous scheme accidentally printed <label> modifiers which ruined the Tasty tests,
1 parent a29e870 commit 3819693

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
2121
private def ta(implicit ctx: Context) = ctx.typeAssigner
2222

2323
def Modifiers(sym: Symbol)(implicit ctx: Context): Modifiers = Modifiers(
24-
sym.flags & ModifierFlags,
24+
sym.flags & (if (sym.isType) ModifierFlags | VarianceFlags else ModifierFlags),
2525
if (sym.privateWithin.exists) sym.privateWithin.asType.name else tpnme.EMPTY,
2626
sym.annotations map (_.tree))
2727

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ object Flags {
437437
/** Flags representing modifiers that can appear in trees */
438438
final val ModifierFlags =
439439
SourceModifierFlags | Module | Param | Synthetic | Package | Local |
440-
CovariantOrOuter | ContravariantOrLabel |
441440
commonFlags(Mutable)
442441
// | Trait is subsumed by commonFlags(Lazy) from SourceModifierFlags
443442

0 commit comments

Comments
 (0)