# Coverage weirdness in \`define-struct\`

**URL:** <https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117>\
**Category:** Questions & Answers\
**Tags:** drracket\
**Created:** [February 20, 2026, 12:36am UTC](https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117 "2026-02-20T00:36:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ToddOBryan](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/toddobryan/32/1962_2.png) [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Post date:** [February 20, 2026, 12:36am UTC](https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117/1 "2026-02-20T00:36:57Z")

</div>

So the fields in structs are marked as uncovered, even if you use selectors to access them.

 ![struct-coverage](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/3/3785567eebcd2d1e1aed6aaa40a4dc4d393ebf0e.png)

After running the definitions, `name` and `grade` are marked as uncovered. I'm pretty sure this is a regression of some sort.

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [February 20, 2026, 1:11am UTC](https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117/2 "2026-02-20T01:11:33Z")

</div>

I think there must be something more to reproduce; I'm seeing no halloween colors with just the struct definition in both the menu-based BSL and in `#lang htdp/bsl`.

---

<div class="post-metadata">

**Author:** ![ToddOBryan](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/toddobryan/32/1962_2.png) [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Post date:** [February 20, 2026, 10:57pm UTC](https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117/3 "2026-02-20T22:57:12Z")

</div>

I just reproduced, but then I chose BSL from the language menu and it went away. When I went back to `#lang htdp/bsl` it didn't happen again.

I'll give it a try with a fresh install and see if maybe choosing Language \> BSL before you try `#lang htdp/bsl` consistently fixes it, and not doing so causes it.

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [February 21, 2026, 1:35am UTC](https://racket.discourse.group/t/coverage-weirdness-in-define-struct/4117/4 "2026-02-21T01:35:07Z")

</div>

It may be some settings in the language dialog are relevant, maybe? ... just a shot in the dark.
