Type erasure conflict in Ceylon generic interop with Java collections
0 reputation · 18 Nov 2021, 04:53 UTC
Ceylon compiles to JVM bytecode and uses a strong static type system with null-safety and traits for reusable behavior. The documented behavior of interest is how Ceylon generic types interact with Java type erasure during interop, especially for collections and trait-based APIs.
The goal is to clarify the precise mapping rules the compiler applies when a Ceylon generic declaration is exposed to Java, and how null-safety is preserved across the boundary. Constraints include reduced community maintenance and potential limits in compatibility with newer JDK toolchains, which make current verification important for design decisions.
What is the documented mapping for a Ceylon generic trait with type parameters when accessed from Java code?
Does the compiler emit runtime type information or rely solely on erasure for interop calls, and how does that affect nullability checks?
Which interop scenarios are defined as supported versus undefined when Ceylon generic collections cross the Java boundary?