Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCE when byte-array-literal occurs within a const-expr #37423

Closed
prakanth97 opened this issue Aug 17, 2022 · 1 comment · Fixed by #40979
Closed

CCE when byte-array-literal occurs within a const-expr #37423

prakanth97 opened this issue Aug 17, 2022 · 1 comment · Fixed by #40979
Assignees
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@prakanth97
Copy link
Contributor

Description:
$title

Steps to reproduce:

const byteArr = base16 `aa bb`;
[2022-08-17 12:48:20,739] SEVERE {b7a.log.crash} - finite type value is not supported for type: other 
java.lang.UnsupportedOperationException: finite type value is not supported for type: other
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.writeConstValue(BIRBinaryWriter.java:482)
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.writeConstValue(BIRBinaryWriter.java:425)
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.writeConstant(BIRBinaryWriter.java:418)
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.lambda$writeConstants$7(BIRBinaryWriter.java:400)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.writeConstants(BIRBinaryWriter.java:400)
        at org.wso2.ballerinalang.compiler.bir.writer.BIRBinaryWriter.serialize(BIRBinaryWriter.java:75)
        at io.ballerina.projects.ModuleContext.generateBIR(ModuleContext.java:502)
        at io.ballerina.projects.ModuleContext.generateCodeInternal(ModuleContext.java:465)
        at io.ballerina.projects.ModuleCompilationState$4.generatePlatformSpecificCode(ModuleCompilationState.java:132)
        at io.ballerina.projects.ModuleContext.generatePlatformSpecificCode(ModuleContext.java:381)
        at io.ballerina.projects.JBallerinaBackend.performCodeGen(JBallerinaBackend.java:165)
        at io.ballerina.projects.JBallerinaBackend.<init>(JBallerinaBackend.java:134)
        at io.ballerina.projects.JBallerinaBackend.lambda$from$0(JBallerinaBackend.java:112)
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
        at io.ballerina.projects.PackageCompilation.getCompilerBackend(PackageCompilation.java:167)
        at io.ballerina.projects.JBallerinaBackend.from(JBallerinaBackend.java:111)
        at io.ballerina.cli.task.CompileTask.execute(CompileTask.java:151)
        at io.ballerina.cli.TaskExecutor.executeTasks(TaskExecutor.java:40)
        at io.ballerina.cli.cmd.RunCommand.execute(RunCommand.java:203)
        at java.base/java.util.Optional.ifPresent(Optional.java:183)
        at io.ballerina.cli.launcher.Main.main(Main.java:51)
@prakanth97 prakanth97 added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Aug 17, 2022
@github-actions
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
2 participants