[Bug]: Data conversion using foreach seems to cause data loss #41819
Labels
Reason/EngineeringMistake
The issue occurred due to a mistake made in the past.
Team/CompilerFE
All issues related to Language implementation and Compiler, this exclude run times.
Team/jBallerina
All the issues related to BIR, JVM backend code generation and runtime
Type/Bug
userCategory/Compilation
Milestone
Description
I'm converting data from list of records to table of records with
foreach
andadd()
. When printing the source and target data structures it looks like data is lost during the conversion. E.g:Source data:
Actual target data:
Expected target data:
This is just one example. You'll see other examples when checking
"y":41
.The compiler reports no errors/warnings.
Steps to Reproduce
The conversion code:
The complete source code and output attached.
bug.zip
Affected Version(s)
OS, DB, other environment details and versions
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: