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

The arrow (->) operator only works on collections #185

Open
echebbi opened this issue Jul 7, 2020 · 0 comments
Open

The arrow (->) operator only works on collections #185

echebbi opened this issue Jul 7, 2020 · 0 comments

Comments

@echebbi
Copy link
Collaborator

echebbi commented Jul 7, 2020

Bug description

Calling a service through -> on a scalar may not lead to the expected result:

open class helloworld::HelloWorld {

    @main
    def void main() {
        self->oclIsTypeOf(helloworld::HelloWorld);  // false
    }

}

Additional context

Cause

Acceleo's EvaluationServices implicitely turns the first argument into a list (see collectionServiceCall#L233). The name "collectionServiceCall" here seems suspicious: why a collection service?

Actually, it looks like every Call instance representing a call made with -> is set to "COLLECTIONCALL":

Solution

Replace #CollectionCall with #CallOrApply and adapt the code accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant