roc/crates/compiler/test_gen/src
Ayaz Hafiz 078f0147ee
Do not bind accessors in toplevel thunks to their thunks' names
In #3352 an optimization to transform `ra = .field` into

```
ra = \#rcd -[ra]-> #rcd.field
```

rather than

```
__ra1 = \#rcd -[__ra1] -> #rcd.field

ra = LambdaSet { __ra1 }
```

was introduced. However, this optimization is not correct when `ra =
.field` is defined as a toplevel thunk, for in such situations we
indeed want the thunk `ra` to return the lambda set it resolves to,
rather than repointing at itself.

Besides reverting this change, another option would be to convert
accessors into closures before translation of Can to IR. However, this
complicates the translation algorithm more than it already is, and I'd
like to avoid additional special-cases.

Closes #4606
2022-12-02 08:50:03 -06:00
..
helpers Merge remote-tracking branch 'origin/main' into https-packages 2022-11-25 19:50:06 -05:00
gen_abilities.rs Support custom abilities for opaques with immaterial lambda sets 2022-11-21 18:03:56 -06:00
gen_compare.rs Fix gen tests in the presence of Eq 2022-10-12 16:38:37 -05:00
gen_dict.rs make dict/set tests return i64 instead of usize (for wasm) 2022-07-24 11:55:09 +02:00
gen_list.rs Decision tree compilation of suffixed list patterns 2022-11-01 15:22:31 -05:00
gen_num.rs Disable test on gen-dev, for now 2022-10-12 16:38:37 -05:00
gen_panic.rs Indent tests more 2022-11-24 14:55:11 -06:00
gen_primitives.rs Update gen tests that have changed due to emplacement 2022-11-16 14:05:52 -06:00
gen_records.rs Do not bind accessors in toplevel thunks to their thunks' names 2022-12-02 08:50:03 -06:00
gen_refcount.rs Update tests 2022-09-20 14:42:03 -05:00
gen_result.rs Update tests 2022-09-20 14:42:03 -05:00
gen_set.rs make dict/set tests return i64 instead of usize (for wasm) 2022-07-24 11:55:09 +02:00
gen_str.rs Correctly destructure patterns that are assigned to a thunk'd value 2022-10-12 09:23:48 -05:00
gen_tags.rs Correct when fixpoint-fixed type variables can be reunified 2022-11-21 15:57:36 -06:00
lib.rs correct formatting and removed duplicate image 2022-11-03 20:02:10 +11:00
tests.rs Add tests for user crash 2022-11-24 14:46:52 -06:00
wasm_linking.rs rename called_preload_fns to called_fns 2022-11-21 19:48:02 +00:00
wasm_str.rs Update wasm-str tests 2022-09-20 14:53:46 -05:00