diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala index 4ea21b1c44..3ee5bf601d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala @@ -47,6 +47,17 @@ trait SyntheticMethods extends ast.TreeDSL { newTyper( if (reporter.hasErrors) context makeSilent false else context ) ) import synthesizer._ + + if (clazz0 isSubClass AnyValClass) return { + if (clazz0.info member nme.getClass_ isDeferred) { + val getClassMethod = createMethod(nme.getClass_, getClassReturnType(clazz.tpe)) { sym => + // XXX dummy implementation for now + NULL + } + treeCopy.Template(templ, templ.parents, templ.self, templ.body :+ getClassMethod) + } + else templ + } val originalAccessors = clazz.caseFieldAccessors // private ones will have been renamed -- make sure they are entered |