Don't mark accessors as thunks

This commit is contained in:
Ayaz Hafiz 2023-01-18 18:10:23 -06:00
parent 6b491c617e
commit f0ab9f77ca
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 13 additions and 18 deletions

View file

@ -5744,8 +5744,10 @@ fn build_pending_specializations<'a>(
let tag = declarations.declarations[index];
match tag {
Value => {
// mark this symbols as a top-level thunk before any other work on the procs
module_thunks.push(symbol);
if !matches!(body.value, roc_can::expr::Expr::Accessor(..)) {
// mark this symbols as a top-level thunk before any other work on the procs
module_thunks.push(symbol);
}
// If this is an exposed symbol, we need to
// register it as such. Otherwise, since it