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

[Question]: Service and Object have the same TypeTag #43034

Open
Shadow-Devil opened this issue Jul 3, 2024 · 2 comments · May be fixed by #43035
Open

[Question]: Service and Object have the same TypeTag #43034

Shadow-Devil opened this issue Jul 3, 2024 · 2 comments · May be fixed by #43035
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Question userCategory/Compilation

Comments

@Shadow-Devil
Copy link
Contributor

Shadow-Devil commented Jul 3, 2024

Description

I don't know if this is a bug or intended, but it seems quite strange that both Object and Service have the same TypeTag. I think it was forgotten to add the +1 to the definition of the service tag.

Relevant code:

public static final int OBJECT = FINITE + 1;
public static final int SERVICE = OBJECT;
public static final int BYTE_ARRAY = OBJECT + 1;

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 Jul 3, 2024
@MaryamZi MaryamZi added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Jul 3, 2024
@MaryamZi
Copy link
Member

MaryamZi commented Jul 3, 2024

Previously (pre-Swan Lake) objects and services used to be two separate things. However, with the current service design, services are just another kind of object, so the two being the same is intentional.

We could probably get rid of the service tag altogether though.

@MaryamZi MaryamZi added Type/Question and removed Type/Bug needTriage The issue has to be inspected and labeled manually labels Jul 3, 2024
@Shadow-Devil Shadow-Devil changed the title [Bug]: Service and Object have the same TypeTag [Question]: Service and Object have the same TypeTag Jul 3, 2024
@Shadow-Devil
Copy link
Contributor Author

Shadow-Devil commented Jul 3, 2024

Thank you for clarifying it. I also added this change to remove the Service TypeTag in one of my PRs where I found it. (#43035)
Commit: df7f0e7

@Shadow-Devil Shadow-Devil linked a pull request Jul 3, 2024 that will close this issue
13 tasks
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/Question userCategory/Compilation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants