This fix prevents exceptions such as "IllegalArgumentException:
Comparison method violates its general contract" by not sorting the list
of methods at all. Since the method selection algorithm scans the
complete list of methods, the order of the list does not impact the
algorithm's outcome.
The fix does not change the precedence of methods since the
implementation of compare(method1, method2) is kept the same.
However, this bug taught us that compare(m1, m2) is not suitable to
establish a total order among a list of methods and that
compare(m1, m2)==0 && compare(m2, m3)==0
does NOT imply compare(m1, m3)==0.
Example:
m1(A a), m2(B b), m3(C c), class A{}, class B{}, class C extends A{}
This observation required another change: When scanning the list of
methods for candidates, it does not suffice to compare the current
candidate with the last best candidate. Instead, it is needed to compare
the current candidate with all best candidates, because
compare(currentCandidate, lastBestCandidate)==0 does NOT imply compare()
to return 0 for the other best candidates.
When calling compare(m1, m2) among the best candidates it is always
expected to return 0, meaning the candidates are unrelated (e.g.
independent inheritance hierarchies of their parameter types) or equal.
see https://github.com/eclipse/xtext-core/issues/238
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@typefox.io>
The Xtend compiler was optimized to minimize the usage of synthetic variables for member feature calls and right-hand assignments
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
For comparison with null the triple (not) equal operator should be used. Resolved compiler warnings
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
see https://github.com/eclipse/xtext-umbrella/issues/3
Remove org.eclipse.buildship.core.prefs
Files are generated on Gradle project import or by Oomph setup
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
connection.project.dir changed to composite build location in new
umbrella project
value 'containers' added by Buildship
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Because they're neither consumed by the old- nor the new formatter.
And they are not needed to generate text.
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@typefox.io>
Implemented new algorithms for computing upper and lower bounds in GrammarConstraintProvider
Signed-off-by: Miro Spönemann <miro.spoenemann@typefox.io>