Skip to content

Add option to create an OpalVal in Java#172

Merged
schlichtig merged 2 commits intodevelopfrom
fix/unsafeOpalVal
Jun 20, 2025
Merged

Add option to create an OpalVal in Java#172
schlichtig merged 2 commits intodevelopfrom
fix/unsafeOpalVal

Conversation

@smeyer198
Copy link
Collaborator

Currently, it is not possible to create an OpalVal in a Java program because we enforce a generic type on the underlying expression. Since Java does not understand Scala's generic type system, one must use explicit types Expr[TacLocal] and cannot use something like Expr[Nothing]. To deal with this problem, this PR adds an "unsafe" way that allows to ignore the generic type in Java programs by doing the cast in the Scala program

@schlichtig schlichtig enabled auto-merge June 20, 2025 10:13
@schlichtig schlichtig merged commit 4eb2a2c into develop Jun 20, 2025
5 checks passed
@schlichtig schlichtig deleted the fix/unsafeOpalVal branch June 20, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants