You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve message when type resolution cannot deduce full record type. Currently the expression
fn (e, job) => e.job = job
gives the following stack trace:
java.lang.ClassCastException: class net.hydromatic.morel.type.TypeVar cannot be cast to class net.hydromatic.morel.type.RecordLikeType (net.hydromatic.morel.type.TypeVar and net.hydromatic.morel.type.RecordLikeType are in unnamed module of loader 'app')
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:410)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:323)
at net.hydromatic.morel.compile.Resolver.lambda$transform$0(Resolver.java:116)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
at net.hydromatic.morel.compile.Resolver.transform(Resolver.java:116)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:378)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:335)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:405)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:323)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:593)
at net.hydromatic.morel.compile.Resolver.lambda$transform$0(Resolver.java:116)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
at net.hydromatic.morel.compile.Resolver.transform(Resolver.java:116)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:440)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:325)
at net.hydromatic.morel.compile.Resolver.lambda$resolveValDecl$6(Resolver.java:201)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at net.hydromatic.morel.compile.Resolver.resolveValDecl(Resolver.java:199)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:144)
at net.hydromatic.morel.compile.Resolver.toCore(Resolver.java:123)
at net.hydromatic.morel.compile.Compiles.prepareDecl(Compiles.java:89)
at net.hydromatic.morel.compile.Compiles.prepareStatement(Compiles.java:71)
It should instead give the following error:
unresolved flex record (can't tell what fields there are besides #job)
As part of this change, we introduce class TypeResolver.TypeException, and add the method Ml.assertTypeException(String message) to improve the testing of types.
The text was updated successfully, but these errors were encountered:
Improve message when type resolution cannot deduce full record type. Currently the expression
gives the following stack trace:
It should instead give the following error:
As part of this change, we introduce
class TypeResolver.TypeException
, and add the methodMl.assertTypeException(String message)
to improve the testing of types.The text was updated successfully, but these errors were encountered: