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

Type checking error #3

Closed
fcoulon opened this issue Jul 16, 2018 · 1 comment
Closed

Type checking error #3

fcoulon opened this issue Jul 16, 2018 · 1 comment
Assignees
Labels
affect: validators Related to Xtext validators bug

Comments

@fcoulon
Copy link
Collaborator

fcoulon commented Jul 16, 2018

Error marker Expected EBoolean but was [EClassifier=EEList] in :

open class HelloWorld {
    def void greeting (Sequence(Boolean) a) {
        Boolean i := a->first();
    }
}

a->first() should be typed boolean

manuelleduc pushed a commit to manuelleduc/ale-lang that referenced this issue Jul 18, 2019
@echebbi
Copy link
Collaborator

echebbi commented Oct 9, 2019

The issue occurs only when the sequence is an argument:

image

@echebbi echebbi added affect: validators Related to Xtext validators bug labels Oct 9, 2019
@echebbi echebbi self-assigned this Nov 21, 2019
echebbi added a commit that referenced this issue Nov 22, 2019
Why:
 - Sequence instances are considered as EList which prevent use of methods like first()

How:
 - Use Ecore datatypes to identify generic parameter types in the AST (ModelBuilder.java)
 - Properly convert Ecore datatypes as AQL types when creating a method scope (BaseValidator.java)

Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
echebbi added a commit that referenced this issue Nov 22, 2019
Why:
 - Sequence instances are considered as EList which prevent use of methods like first()

How:
 - Use Ecore datatypes to identify generic parameter types in the AST (ModelBuilder.java)
 - Properly convert Ecore datatypes as AQL types when creating a method scope (BaseValidator.java)

Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affect: validators Related to Xtext validators bug
Projects
None yet
Development

No branches or pull requests

2 participants