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

[Bug]: Intersection of readonly and record type with defaults doesn't function correctly when it is within a Ballerina package #42523

Closed
chiranSachintha opened this issue Apr 9, 2024 · 4 comments
Assignees
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. Type/Bug userCategory/Compilation
Milestone

Comments

@chiranSachintha
Copy link
Member

Description

$title.

Following program compiles without any error when it is in ballerina package.

type Temp record {|
    any[] initalValues = [10, 20, 30];
|};

function value() {
    // Now results in compile-time error.
    Temp & readonly _ = {};
}

Steps to Reproduce

No response

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Apr 9, 2024
@chiranSachintha chiranSachintha self-assigned this Apr 9, 2024
@chiranSachintha chiranSachintha added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. and removed needTriage The issue has to be inspected and labeled manually labels Apr 9, 2024
@LakshanWeerasinghe LakshanWeerasinghe added this to the 2201.9.0 milestone Apr 10, 2024
@nipunayf
Copy link
Contributor

Closed via #42524

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.

@nipunayf nipunayf added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Apr 10, 2024
@lochana-chathura
Copy link
Member

@nipunayf @chiranSachintha can't see the fix sent to the master?

@MaryamZi
Copy link
Member

Changes introduce to master via #42564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. Type/Bug userCategory/Compilation
Projects
None yet
Development

No branches or pull requests

6 participants