-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
compat:javaitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.
Description
Compiler version
Scala version 3.3.3 and 3.5.1
Minimized code
The code below runs in Java. But in Scala, it throws an IllegalAccessError exception.
package experiment
import com.linecorp.armeria.common.HttpResponse
import com.linecorp.armeria.server.Server
@main def hello(): Unit =
val server = Server.builder()
.contextPath("/v1")
.service("/", (ctx, req) => HttpResponse.of("Hello, world"))
.and()
.build()
.start()
println(s"server started = ${server}")
build.sbt
val scala3Version = "3.5.1"
lazy val root = project
.in(file("."))
.settings(
name := "test-armeria",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
libraryDependencies ++= Seq(
"com.linecorp.armeria" % "armeria" % "1.30.1",
)
)
Output
Exception in thread "main" java.lang.IllegalAccessError: failed to access class com.linecorp.armeria.server.AbstractContextPathServicesBuilder from class experiment.Main$package$ (com.linecorp.armeria.server.AbstractContextPathServicesBuilder and experiment.Main$package$ are in unnamed module of loader 'app')
at experiment.Main$package$.hello(Main.scala:9)
at experiment.hello.main(Main.scala:6)
Expectation
The code should run without error.
Metadata
Metadata
Assignees
Labels
compat:javaitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.