tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
47 stars 11 forks source link

reg_issue118 fails with require-condition in clazzWithSpecificOuter #2146

Closed michaellilltokiwa closed 2 weeks ago

michaellilltokiwa commented 1 year ago
/home/not_synced/fuzion (2023-10-26T13-32-55+02-00)130$ make -C build/tests/reg_issue118/
RUN issue118.fz 0a1,33
> 
> error 1: java.lang.Error: require-condition1 failed: dev.flang.air.Clazzes:clazzWithSpecificOuter:1175
>       at dev.flang.util.ANY.require(ANY.java:111)
>       at dev.flang.air.Clazzes.clazzWithSpecificOuter(Clazzes.java:1175)
>       at dev.flang.air.Clazz.lookup(Clazz.java:1267)
>       at dev.flang.air.Clazzes.findClazzes(Clazzes.java:826)
>       at dev.flang.air.Clazz$1.action(Clazz.java:1536)
>       at dev.flang.ast.Expr.visitExpressions(Expr.java:211)
>       at dev.flang.ast.AbstractCall.visitExpressions(AbstractCall.java:112)
>       at dev.flang.ast.Box.visitExpressions(Box.java:163)
>       at dev.flang.ast.AbstractAssign.visitExpressions(AbstractAssign.java:138)
>       at dev.flang.ast.AbstractBlock.visitExpressions(AbstractBlock.java:99)
>       at dev.flang.ast.AbstractCase.visitExpressions(AbstractCase.java:153)
>       at dev.flang.ast.AbstractMatch.visitExpressions(AbstractMatch.java:127)
>       at dev.flang.ast.AbstractBlock.visitExpressions(AbstractBlock.java:99)
>       at dev.flang.ast.AbstractCall.visitExpressions(AbstractCall.java:110)
>       at dev.flang.ast.Box.visitExpressions(Box.java:163)
>       at dev.flang.ast.AbstractAssign.visitExpressions(AbstractAssign.java:138)
>       at dev.flang.ast.AbstractBlock.visitExpressions(AbstractBlock.java:99)
>       at dev.flang.ast.AbstractFeature.visitExpressions(AbstractFeature.java:1458)
>       at dev.flang.air.Clazz.inspectCode(Clazz.java:1484)
>       at dev.flang.air.Clazz.findAllClasses(Clazz.java:1531)
>       at dev.flang.air.Clazzes.findAllClasses(Clazzes.java:431)
>       at dev.flang.fuir.FUIR.<init>(FUIR.java:207)
>       at dev.flang.opt.Optimizer.fuir(Optimizer.java:73)
>       at dev.flang.tools.Fuzion$Backend.processFrontEnd(Fuzion.java:442)
>       at dev.flang.tools.Fuzion.lambda$parseArgsForBackend$3(Fuzion.java:908)
>       at dev.flang.tools.Tool.lambda$run$0(Tool.java:145)
>       at dev.flang.util.Errors.runAndExit(Errors.java:790)
>       at dev.flang.tools.Tool.run(Tool.java:145)
>       at dev.flang.tools.Fuzion.main(Fuzion.java:557)
> 
> *** fatal errors encountered, stopping.
*** FAILED out on issue118.fz
make: *** [../simple.mk:45: int] Error 1
michaellilltokiwa commented 6 months ago

see also : #2969

michaellilltokiwa commented 5 months ago

This somehow passes the middleend:

ex is

  say ex.this.type.max

  type.max ex.this => abstract

but crashes in DFA:


/home/sam/playground/test.fz:3:20: error 1: NYI: in ex(0 args) at 805306370 no targets for Call (ex.#type ex).max(outer ex.#type ex) ex target UNIT
  say ex.this.type.max
-------------------^^^
Considered targets: 

program entry point
    |
    +- performs call ex => *** VOID *** ENV: 'NO ENV'
program entry point
    |
    +- performs call ex => *** VOID *** ENV: 'NO ENV'
program entry point
    |
    +- performs call ex => *** VOID *** ENV: 'NO ENV'
one error.
michaellilltokiwa commented 2 weeks ago

meanwhile fixed