Skip to content

In mixed compilation, Java parser can't handle JUnit annotation #20026

Closed
@SethTisue

Description

@SethTisue

This came up at Lightbend over at akka/alpakka-kafka#1727

% cat S.scala
class S

% cat J.java
//> using scala 3.4.0
//> using dep org.junit.jupiter:junit-jupiter-api:5.10.2
@TestInstance(org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS)
class J { }

% scala-cli compile .
Compiling project (Scala 3.4.0, JVM (17))
[error] ./J.java:6:1
[error] ')' expected but eof found.

Next, I will see if I can construct a reproducer that doesn't involve an external library.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions