@@ -1153,7 +1153,7 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
1153
1153
1154
1154
// ExplicitOuter replaces `Select(q, outerSym) OBJ_EQ expectedPrefix` by `Select(q, outerAccessor(outerSym.owner)) OBJ_EQ expectedPrefix`
1155
1155
// if there's an outer accessor, otherwise the condition becomes `true` -- TODO: can we improve needsOuterTest so there's always an outerAccessor?
1156
- val outer = expectedTp.typeSymbol.newMethod(vpmName.outer) setInfo expectedTp.prefix setFlag SYNTHETIC | ARTIFACT
1156
+ val outer = expectedTp.typeSymbol.newMethod(vpmName.outer, newFlags = SYNTHETIC | ARTIFACT ) setInfo expectedTp.prefix
1157
1157
1158
1158
(Select (codegen._asInstanceOf(testedBinder, expectedTp), outer)) OBJ_EQ expectedOuter
1159
1159
}
@@ -1415,7 +1415,7 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
1415
1415
1416
1416
// assert(owner ne null); assert(owner ne NoSymbol)
1417
1417
def freshSym (pos : Position , tp : Type = NoType , prefix : String = " x" ) =
1418
- NoSymbol .newTermSymbol(freshName(prefix), pos) setInfo tp
1418
+ NoSymbol .newTermSymbol(freshName(prefix), pos, newFlags = SYNTHETIC ) setInfo tp
1419
1419
1420
1420
def newSynthCaseLabel (name : String ) =
1421
1421
NoSymbol .newLabel(freshName(name), NoPosition ) setFlag treeInfo.SYNTH_CASE_FLAGS
@@ -3611,7 +3611,7 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
3611
3611
*/
3612
3612
def matcher (scrut : Tree , scrutSym : Symbol , restpe : Type )(cases : List [Casegen => Tree ], matchFailGen : Option [Tree => Tree ]): Tree = {
3613
3613
val matchEnd = newSynthCaseLabel(" matchEnd" )
3614
- val matchRes = NoSymbol .newValueParameter(newTermName(" x" ), NoPosition , SYNTHETIC ) setInfo restpe.withoutAnnotations
3614
+ val matchRes = NoSymbol .newValueParameter(newTermName(" x" ), NoPosition , newFlags = SYNTHETIC ) setInfo restpe.withoutAnnotations
3615
3615
matchEnd setInfo MethodType (List (matchRes), restpe)
3616
3616
3617
3617
def newCaseSym = newSynthCaseLabel(" case" ) setInfo MethodType (Nil , restpe)
0 commit comments