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
{{ message }}
Repository navigation
Can't retrieve a toplevel table from a local struct field and index it? #1333
This is a minimization of the problem @emilyfertig encountered in #1332. The chain of interactions is to make a table, make a struct containing that table, then access that field of the struct and try to index the table. Oddly, if we do all of these steps at the top level, it works fine:
But if we make the struct construction local, we get a compiler error:
:p
y = (Foo table)
y.foo[0@(Fin 2)]
> Compiler bug!
> Please report this at github.com/google-research/dex-lang/issues
>
> Unexpected table: table
> CallStack (from HasCallStack):
> error, called at src/lib/Simplify.hs:570:22 in dex-0.1.0.0-Gi9B8TxRbicLQnuTnmjlXJ:Simplify
That line number is in simplifyTabApp, which can't handle the table being a Var that's not wrapped in SimpInCore, which is what, in this example, it is getting.
Activity
Add investigation report for 12 critical issues