diff options
Diffstat (limited to 'sources/scalac/ast/TreeGen.java')
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index bba074a80a..5ffeade7ac 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -1107,8 +1107,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { Type[] parentTypes = { definitions.ANYREF_TYPE(), definitions.FUNCTION_TYPE(argtypes, restype) }; - Symbol clazz = owner.newClass( - pos, 0, Names.ANON_CLASS_NAME.toTypeName()); + Symbol clazz = owner.newAnonymousClass(pos); clazz.setInfo(Type.compoundType(parentTypes, new Scope(), clazz)); clazz.allConstructors().setInfo( Type.MethodType(Symbol.EMPTY_ARRAY, clazz.typeConstructor())); @@ -1131,8 +1130,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { public Tree mkPartialFunction(int pos, Tree applyVisitor, Tree isDefinedAtVisitor, Type pattype, Type restype, Symbol owner) { - Symbol clazz = owner.newClass( - pos, 0, Names.ANON_CLASS_NAME.toTypeName()); + Symbol clazz = owner.newAnonymousClass(pos); Type[] parentTypes = { definitions.ANYREF_TYPE(), definitions.PARTIALFUNCTION_TYPE(pattype, restype)}; |