8000 The arrow (->) operator only works on collections · Issue #185 · gemoc/ale-lang · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The arrow (->) operator only works on collections #185
Open
@echebbi

Description

@echebbi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0