diff --git a/src/main/kotlin/org/openrewrite/kotlin/internal/KotlinParserVisitor.kt b/src/main/kotlin/org/openrewrite/kotlin/internal/KotlinParserVisitor.kt index 2e44c3974..8c0725af9 100644 --- a/src/main/kotlin/org/openrewrite/kotlin/internal/KotlinParserVisitor.kt +++ b/src/main/kotlin/org/openrewrite/kotlin/internal/KotlinParserVisitor.kt @@ -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) } } diff --git a/src/test/java/org/openrewrite/kotlin/tree/EnumTest.java b/src/test/java/org/openrewrite/kotlin/tree/EnumTest.java index a5ceb5a37..181726b40 100644 --- a/src/test/java/org/openrewrite/kotlin/tree/EnumTest.java +++ b/src/test/java/org/openrewrite/kotlin/tree/EnumTest.java @@ -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; @@ -141,7 +140,6 @@ fun foo() = print("foo",) @Test @Issue("https://github.com/openrewrite/rewrite-kotlin/issues/307") - @ExpectedToFail void enumWithFunction() { rewriteRun( kotlin(