Add a few type witnesses to help Eclipse 2023-12's compiler

There seems to be an ecj compiler regression in 2023-09/2023-12, where type inference of our Tools.map() method fails here and there for not yet known reasons. I might investigate this later. For now, type witnesses will do.
This commit is contained in:
Lukas Eder 2024-03-13 10:54:18 +01:00
parent c06dc86c42
commit c1d950cc5c
3 changed files with 5 additions and 5 deletions

View File

@ -1036,7 +1036,7 @@ implements
// [#8937] With DEFAULT VALUES, there is no SELECT. Create one from
// known DEFAULT expressions, or use NULL.
if (s == null)
s = select(map(f, x -> x.getDataType().defaulted() ? x.getDataType().default_() : DSL.inline(null, x)));
s = select(map(f, (Field<?> x) -> x.getDataType().defaulted() ? x.getDataType().default_() : DSL.inline(null, x)));

View File

@ -1325,7 +1325,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
DSL.select(new QualifiedSelectFieldList(table(name("t")), select))
.from(copy.asTable("t"))
.where(rn.eq(one()))
.orderBy(map(orderBy, o -> unqualified(o)));
.orderBy(map(orderBy, (SortField<?> o) -> unqualified(o)));
if (limit.limit != null) {
SelectLimitPercentStep<?> s2 = s1.limit(limit.limit);
@ -1552,7 +1552,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
&& !s.having.hasWhere()
&& !s.limit.isApplicable()
&& !s.hasUnions())
s.union((Select<R>) DSL.select(map(s.getSelect(), f -> inline((Object) null, f))).where(falseCondition()));
s.union((Select<R>) DSL.select(map(s.getSelect(), (Field<?> f) -> inline((Object) null, f))).where(falseCondition()));
}));
else
accept0(ctx);
@ -3687,7 +3687,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
// [#7222] Workaround for https://issues.apache.org/jira/browse/DERBY-6983
if (ctx.family() == DERBY)
ctx.visit(new SelectFieldList<>(map(fields, f -> Tools.unqualified(f))));
ctx.visit(new SelectFieldList<>(Tools.<Field<?>, Field<?>, RuntimeException>map(fields, f -> Tools.unqualified(f))));
else
ctx.sql('*');

View File

@ -1876,7 +1876,7 @@ final class Tools {
}
static final List<JSONEntry<?>> jsonEntries(Field<?>[] entries) {
return Tools.map(entries, f -> DSL.jsonEntry(f));
return Tools.map(entries, (Field<?> f) -> DSL.jsonEntry(f));
}
private static final IllegalArgumentException fieldExpected(Object value) {