File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,9 @@ class Inlining extends MacroTransform, SymTransformer {
88
88
val TypeDef (name, tmpl : Template ) = innerClass : @ unchecked
89
89
val newInnerParents = tmpl.parents.mapConserve(ConcreteParentStripper .apply)
90
90
val tmpl1 = cpy.Template (tmpl)(parents = newInnerParents) // TODO .withType(???)
91
- cpy.TypeDef (innerClass)(name = newInnerClassName(name), rhs = tmpl1)
91
+ val newTrait = cpy.TypeDef (innerClass)(name = newInnerClassName(name), rhs = tmpl1)
92
+ newTrait.symbol.setFlag(Synthetic )
93
+ newTrait
92
94
end makeTraitFromInnerClass
93
95
94
96
private def makeTypeFromInnerClass (parentSym : Symbol , innerClass : TypeDef , newTraitSym : Symbol )(using Context ): TypeDef =
@@ -101,7 +103,7 @@ class Inlining extends MacroTransform, SymTransformer {
101
103
val newTypeSym = newSymbol(
102
104
owner = parentSym,
103
105
name = newTraitSym.name.asTypeName,
104
- flags = innerClass.symbol.flags & (Private | Protected ),
106
+ flags = innerClass.symbol.flags & (Private | Protected ) | Synthetic ,
105
107
info = TypeBounds .upper(upperBound),
106
108
privateWithin = innerClass.symbol.privateWithin,
107
109
coord = innerClass.symbol.coord,
You can’t perform that action at this time.
0 commit comments