Skip to content

Commit 6c9291d

Browse files
committed
Make Mutable a ModifierFlag.
It definitely does appear in trees, so should be included in the set. Affects how things are printed. Before, typed var's would still show up as vals.
1 parent 87442de commit 6c9291d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ object Flags {
427427

428428
/** Flags representing modifiers that can appear in trees */
429429
final val ModifierFlags =
430-
SourceModifierFlags | Module | Param | Synthetic | Package | Local
430+
SourceModifierFlags | Module | Param | Synthetic | Package | Local | commonFlags(Mutable)
431431
// | Trait is subsumed by commonFlags(Lazy) from SourceModifierFlags
432432

433433
assert(ModifierFlags.isTermFlags && ModifierFlags.isTypeFlags)
@@ -520,12 +520,18 @@ object Flags {
520520
/** A private method */
521521
final val PrivateMethod = allOf(Private, Method)
522522

523+
/** A private accessor */
524+
final val PrivateAccessor = allOf(Private, Accessor)
525+
523526
/** A type parameter with synthesized name */
524527
final val ExpandedTypeParam = allOf(ExpandedName, TypeParam)
525528

526529
/** A parameter or parameter accessor */
527530
final val ParamOrAccessor = Param | ParamAccessor
528531

532+
/** A lazy or deferred value */
533+
final val LazyOrDeferred = Lazy | Deferred
534+
529535
/** A type parameter or type parameter accessor */
530536
final val TypeParamOrAccessor = TypeParam | TypeParamAccessor
531537

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
172172
* parent { type Apply = body; argBindings? }
173173
*
174174
* split it into
175-
175+
*
176176
* - the `parent`
177177
* - the simplified `body`
178178
* - the bindings HK$ members, if there are any

0 commit comments

Comments
 (0)