File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1017,7 +1017,7 @@ object desugar {
10171017 var tested : MemberDef = tree
10181018 def fail (msg : String ) = ctx.error(msg, tree.sourcePos)
10191019 def checkApplicable (flag : FlagSet , test : MemberDefTest ): Unit =
1020- if (tested.mods.is(flag) && ! test.applyOrElse(tree, _ => false )) {
1020+ if (tested.mods.is(flag) && ! test.applyOrElse(tree, ( md : MemberDef ) => false )) {
10211021 fail(i " modifier ` $flag` is not allowed for this definition " )
10221022 tested = tested.withMods(tested.mods.withoutFlags(flag))
10231023 }
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ object Annotations {
181181 object WithBounds {
182182 def unapply (ann : Annotation )(implicit ctx : Context ): Option [TypeBounds ] =
183183 if (ann.symbol == defn.WithBoundsAnnot ) {
184+ import ast .Trees ._
184185 // We need to extract the type of the type tree in the New itself.
185186 // The annotation's type has been simplified as the type of an expression,
186187 // which means that `&` or `|` might have been lost.
You can’t perform that action at this time.
0 commit comments