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]: No error when referencing readonly service object inside non serveice class #41175

Closed
rdulmina opened this issue Aug 8, 2023 · 1 comment · Fixed by #41169
Closed
Assignees
Labels
Area/Compiler 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
Milestone

Comments

@rdulmina
Copy link
Contributor

rdulmina commented Aug 8, 2023

Description

public type FooObj readonly & distinct service object {
    isolated remote function execute(string aVar, int bVar) returns int;
};

readonly client class FooClass {
    *FooObj;

    isolated remote function execute(string aVar, int bVar) returns int {
        return bVar;
    }
}

Including the service object FooObj inside FooClass does not give any error. If we remove readonly from the FooObj it gives the error invalid object type inclusion: missing 'service' qualifier(s) in the referencing object

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Aug 8, 2023
@rdulmina rdulmina added Area/Compiler 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 userCategory/Compilation labels Aug 8, 2023
@rdulmina rdulmina self-assigned this Aug 8, 2023
rdulmina added a commit that referenced this issue Aug 8, 2023
rdulmina added a commit that referenced this issue Aug 8, 2023
@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.

@rdulmina rdulmina added this to the 2201.8.0 milestone Aug 21, 2023
@rdulmina rdulmina added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Aug 21, 2023
@rdulmina rdulmina changed the title [Bug]: No error when referencing service object inside non serveice object [Bug]: No error when referencing service object inside non serveice class Aug 21, 2023
@rdulmina rdulmina changed the title [Bug]: No error when referencing service object inside non serveice class [Bug]: No error when referencing readonly service object inside non serveice class Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Compiler 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
Projects
None yet
2 participants