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

Enable readonly object checks for annotation value #24246

Closed
KRVPerera opened this issue Jun 17, 2020 · 3 comments · Fixed by #40074
Closed

Enable readonly object checks for annotation value #24246

KRVPerera opened this issue Jun 17, 2020 · 3 comments · Fixed by #40074
Assignees
Labels
Lang/Annotations Related to Annotations implementation Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/SpecDeviation Type/Task
Milestone

Comments

@KRVPerera
Copy link
Contributor

KRVPerera commented Jun 17, 2020

Description:
This issue depends on StandardLibs changes: https://github.com/ballerina-platform/ballerina-lang/issues/24217

Steps to reproduce:
Create an object with invalid readonly values and try to use it in an annotation value. The compiler does not complain.

Affected Versions:
all

Related Issues (optional):
#24217 #24245

Suggested Labels (optional):
Area/Language

@pubudu91 pubudu91 added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Task labels Jun 19, 2020
@MaryamZi
Copy link
Member

annotation record {| Foo f; |} annot on type;

class Foo {
    int i = 0;
}

@annot {
    f: new ()
}
type Bar record {|
    
|};

@MaryamZi
Copy link
Member

I believe we can fix this now since the stdlib scenarios were fixed. This may be a breaking change though.

@KRVPerera KRVPerera added Lang/Annotations Related to Annotations implementation Type/SpecDeviation labels Jul 20, 2022
@KRVPerera KRVPerera changed the title enable readonly object checks for annotation value Enable readonly object checks for annotation value Jul 20, 2022
@gimantha gimantha added the Deferred Tag tasks not addressed >1 year, moved to closed state, until addressed in the future. label Feb 28, 2023
@MaryamZi MaryamZi self-assigned this Mar 30, 2023
@MaryamZi MaryamZi removed the Deferred Tag tasks not addressed >1 year, moved to closed state, until addressed in the future. label Mar 30, 2023
@MaryamZi MaryamZi reopened this Mar 30, 2023
@MaryamZi
Copy link
Member

MaryamZi commented Apr 3, 2023

Although ballerina-platform/ballerina-library#74 was fixed, seems like there are other mutable fields in HTTP annotations now - ballerina-platform/ballerina-library#4300.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang/Annotations Related to Annotations implementation Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/SpecDeviation Type/Task
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants