Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-condition in resolvetypes for lambda defined in universe #3371

Closed
michaellilltokiwa opened this issue Jul 12, 2024 · 0 comments · Fixed by #3373
Closed

check-condition in resolvetypes for lambda defined in universe #3371

michaellilltokiwa opened this issue Jul 12, 2024 · 0 comments · Fixed by #3373
Labels
bug Something isn't working front end related to the front end until .fum file is created: call and type resolution, type checking, etc.

Comments

@michaellilltokiwa
Copy link
Member

a := [("Alice", 23), ("Bob", 12), ("Charly", 32)]
age_sum := a.map (p -> p.1) |> sum
count   := a.map (p -> 1) |> sum
say "average age {age_sum / count}"

error 1: java.lang.Error: check-condition failed: This.java:249 "(Errors.any() || (or != null));"
        at dev.flang.util.ANY.check(ANY.java:439)
        at dev.flang.ast.This.resolveTypes(This.java:249)
        at dev.flang.ast.AbstractCurrent.resolveTypes(AbstractCurrent.java:117)
        at dev.flang.ast.Feature$ResolveTypes.action(Feature.java:1381)
        at dev.flang.ast.AbstractCurrent.visit(AbstractCurrent.java:94)
        at dev.flang.ast.Call.visit(Call.java:1167)
        at dev.flang.ast.Resolution.resolveType(Resolution.java:574)
        at dev.flang.ast.Call.lambda$resolveTypesOfActuals$9(Call.java:953)
        at dev.flang.ast.Feature.whenResolvedTypes(Feature.java:1460)
        at dev.flang.ast.Call.resolveTypesOfActuals(Call.java:945)
        at dev.flang.ast.Call.resolveTypes(Call.java:2388)
        at dev.flang.ast.Feature$ResolveTypes.action(Feature.java:1374)
        at dev.flang.ast.Feature$ResolveTypes.action(Feature.java:1365)
        at dev.flang.ast.Call.visit(Call.java:1170)
        at dev.flang.ast.Resolution.resolveType(Resolution.java:574)
        at dev.flang.ast.Call.lambda$resolveTypesOfActuals$9(Call.java:953)
        at dev.flang.ast.Feature.internalResolveTypes(Feature.java:1434)
        at dev.flang.ast.Resolution.resolveOne(Resolution.java:454)
        at dev.flang.ast.Resolution.resolve(Resolution.java:421)
        at dev.flang.fe.SourceModule.createASTandResolve(SourceModule.java:272)
        at dev.flang.fe.FrontEnd.<init>(FrontEnd.java:195)
        at dev.flang.tools.Fuzion.lambda$parseArgsForBackend$3(Fuzion.java:1067)
        at dev.flang.tools.Tool.lambda$run$0(Tool.java:141)
        at dev.flang.util.Errors.runAndExit(Errors.java:957)
        at dev.flang.tools.Tool.run(Tool.java:141)
        at dev.flang.tools.Fuzion.main(Fuzion.java:626)


*** fatal errors encountered, stopping.
one error.
@michaellilltokiwa michaellilltokiwa added bug Something isn't working front end related to the front end until .fum file is created: call and type resolution, type checking, etc. labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working front end related to the front end until .fum file is created: call and type resolution, type checking, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant