diff --git a/joern-cli/frontends/javasrc2cpg/src/test/scala/io/joern/javasrc2cpg/querying/VarDeclTests.scala b/joern-cli/frontends/javasrc2cpg/src/test/scala/io/joern/javasrc2cpg/querying/VarDeclTests.scala index a14cfa4e4781..9ff6e174b751 100644 --- a/joern-cli/frontends/javasrc2cpg/src/test/scala/io/joern/javasrc2cpg/querying/VarDeclTests.scala +++ b/joern-cli/frontends/javasrc2cpg/src/test/scala/io/joern/javasrc2cpg/querying/VarDeclTests.scala @@ -206,6 +206,17 @@ class VarDeclTests extends JavaSrcCode2CpgFixture { .head shouldBe "org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer.:(3)" } + "parse enums correctly" in { + val cpg = code(""" + |public enum Color { + | RED, + | GREEN, + | BLUE + |} + |""".stripMargin).withConfig(Config().withKeepTypeArguments(true)) + + cpg.typeDecl("Color").code.head shouldBe "public enum Color" + } } }