Fixes: #135 Type inference assigns boxed type#271
Conversation
| """.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.
There was a problem hiding this comment.
As for splitting the test class in tow, I concur, but it I would isolate the test cases for checking the
inferred type first. If you like me to do so I could also separate the primitive type casts as suggested.
As for the record, your sentence is incomplete; I assume you disliked the (static) inner class.
My thinking here was that it only makes sense in the context of this class.
Thus it is not needed any where else and I thought would only pollute the public namespace if moved to top level.
Also by isolating the tests for checking the inferred type the record (which is now called CheckInferredFeatureTypeTuple)
now lives as an (static) inner class of a separate class.
There was a problem hiding this comment.
Isolating the test for the inferred types is fine for me, and so is the static inner class. I just meant that, reading the test from top to bottom, it takes a long time until I see what a CheckInferredFeatureTypeFixture contains. Therefore, I wondered whether we should move the static inner class to "before it's used", i.e., towards the top of the surrounding class.
because it is not actually a Fixture.
since it does not matter anyway.
| var result = internalParse(""" | ||
| export package to "http://example.com" | ||
|
|
||
| assertThat(result).hasIssues("Cannot infer type"); | ||
| } | ||
| import "http://example.org/restaurant" as rest | ||
| import "http://example.org/reviewpage" |
There was a problem hiding this comment.
Why do we need the internalParse with the two imports here? Is the reviewpage metamodel used in this test?
| .isEqualTo(fixture.expectedClassifier); | ||
| } | ||
|
|
||
| private EClassifier getClassifierOrFail(TypeInfo typeInfo) { |
There was a problem hiding this comment.
Why is getFeatureOrFail in a separate class, but getClassifierOrFail and inferredTypeOrFail are not?
No description provided.