Skip to content

Commit

Permalink
Also parse other class members in enum classes
Browse files Browse the repository at this point in the history
Fixes: #307
  • Loading branch information
knutwannheden committed Sep 11, 2023
1 parent f8fb467 commit 7612f24
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3989,10 +3989,6 @@ class KotlinParserVisitor(
val range = TextRange(declaration.source!!.startOffset, declaration.source!!.endOffset)
generatedFirProperties[range] = declaration
} else {
// We aren't interested in the generated values.
if (ClassKind.ENUM_CLASS == classKind && declaration.source != null) {
continue
}
membersMultiVariablesSeparated.add(declaration)
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/openrewrite/kotlin/tree/EnumTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.openrewrite.kotlin.tree;

import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.ExpectedToFail;
import org.openrewrite.Issue;
import org.openrewrite.test.RewriteTest;

Expand Down Expand Up @@ -141,7 +140,6 @@ fun foo() = print("foo",)

@Test
@Issue("https://github.com/openrewrite/rewrite-kotlin/issues/307")
@ExpectedToFail
void enumWithFunction() {
rewriteRun(
kotlin(
Expand Down

0 comments on commit 7612f24

Please sign in to comment.