Generate lambdas in enum entry super calls

#KT-4423 Fixed
This commit is contained in:
Alexander Udalov
2014-10-16 20:19:07 +04:00
parent 1edaf43051
commit 6ec71b3fd1
3 changed files with 31 additions and 1 deletions
@@ -180,7 +180,12 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
assert descriptor != null :
String.format("No descriptor for enum entry \n---\n%s\n---\n", JetPsiUtil.getElementTextWithContext(enumEntry));
if (!enumEntry.getDeclarations().isEmpty()) {
if (enumEntry.getDeclarations().isEmpty()) {
for (JetDelegationSpecifier specifier : enumEntry.getDelegationSpecifiers()) {
specifier.accept(this);
}
}
else {
bindingTrace.record(ENUM_ENTRY_CLASS_NEED_SUBCLASS, descriptor);
super.visitEnumEntry(enumEntry);
}