Fixed codegen for annotation classes
This commit is contained in:
committed by
Pavel Punegov
parent
b8340ead91
commit
e3236a5d04
+4
-1
@@ -706,7 +706,10 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
override fun visitClass(declaration: IrClass) {
|
override fun visitClass(declaration: IrClass) {
|
||||||
context.log{"visitClass : ${ir2string(declaration)}"}
|
context.log{"visitClass : ${ir2string(declaration)}"}
|
||||||
if (declaration.descriptor.kind == ClassKind.ANNOTATION_CLASS) {
|
if (declaration.descriptor.kind == ClassKind.ANNOTATION_CLASS) {
|
||||||
// do not generate any code for annotation classes as a workaround for NotImplementedError
|
// For annotation classes generate only nested classes.
|
||||||
|
declaration.declarations
|
||||||
|
.filterIsInstance<IrClass>()
|
||||||
|
.forEach { it.acceptVoid(this) }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
using(ClassScope(declaration)) {
|
using(ClassScope(declaration)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user