You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code-generation of a VDM-SL spec with Records to Java gives the following error: Reference to Record is ambiguous [ERROR] both interface org.overture.codegen.runtime.Record in org.overture.codegen.runtime and class java.lang.Record in java.lang match
as of JDK 14, Record has become part of Java.Lang. This means, that it is default imported.
So import org.overture.codegen.runtime.*; indeed brings in Record, but it does not override the Java.Lang.Record. And therefore becomes ambiguous. As I understand it, importing record explicitly should solve it.
I.e. replace import org.overture.codegen.runtime.*; with import org.overture.codegen.runtime.Record
Description
Code-generation of a VDM-SL spec with Records to Java gives the following error:
Reference to Record is ambiguous [ERROR] both interface org.overture.codegen.runtime.Record in org.overture.codegen.runtime and class java.lang.Record in java.lang match
as of JDK 14, Record has become part of Java.Lang. This means, that it is default imported.
So
import org.overture.codegen.runtime.*;
indeed brings in Record, but it does not override the Java.Lang.Record. And therefore becomes ambiguous. As I understand it, importing record explicitly should solve it.I.e. replace
import org.overture.codegen.runtime.*;
withimport org.overture.codegen.runtime.Record
Steps to Reproduce
Build this: https://github.com/INTO-CPS-Association/maestro/tree/development/modeldefinitionchecker with jdk14+
Expected behavior: [What you expect to happen]
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
Versions
All I think
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
The text was updated successfully, but these errors were encountered: