Fixes: #135 Type inference assigns boxed type#271
Conversation
| return typeReferences.typeRef(List.class, typeRef); | ||
| } | ||
|
|
||
| private void addJoinExpression(MainQuery mainQuery, Join join, int joinIndex) { |
There was a problem hiding this comment.
I would call this addJoinExpressions, as there can be multiple, right?
| "Type mismatch: cannot convert from EShort (short) to EBoolean (boolean)", | ||
| "Type mismatch: cannot convert from EShort (short) to EString (String)", | ||
| "Type mismatch: cannot convert from EBoolean (boolean) to EShort (short)", | ||
| "Type mismatch: cannot convert from EShortObject (Short) to EBoolean (boolean)" |
There was a problem hiding this comment.
If I understand this correctly, the EShortObject (Short) to EBoolean (boolean) issue is no longer reported, because in this case the EShort (short) to EBoolean (boolean) issue is reported instead. However, we should then check that this issue is actually reported twice (for p1 and p4). If hasIssues does not support this, we could split this test case in two separates ones.
| .isEqualTo(fixture.expectedClassifier); | ||
| } | ||
|
|
||
| private String filmSummeryPerYearQuery(String summeryBody) { |
| """.formatted(summeryBody); | ||
| } | ||
|
|
||
| private record CheckInferredFeatureTypeFixture( |
There was a problem hiding this comment.
I would move this record to before it's used for the test sources. Also, we could create a separate test class for inferring the primitive types correctly.
| String featureName, | ||
| String featureDeclaration, | ||
| EClassifier expectedClassifier, | ||
| Boolean shouldBeMany |
There was a problem hiding this comment.
Is there a reason why you're using the boxed type here?
| } | ||
| } | ||
|
|
||
| private Feature getFeatureOrFail(Query query, String featureName) { |
There was a problem hiding this comment.
These methods should probably be moved to a test util class, as they could be of use in other test classes as well.
No description provided.