Skip to content

Add @checked annotations to secondlife.d.luau#125

Open
tapple wants to merge 15 commits into
secondlife:mainfrom
tapple:@checked
Open

Add @checked annotations to secondlife.d.luau#125
tapple wants to merge 15 commits into
secondlife:mainfrom
tapple:@checked

Conversation

@tapple

@tapple tapple commented May 9, 2026

Copy link
Copy Markdown
Contributor

Functions marked @checked has run-time type checks that match the typechecker. These functions report the same errors in --!strict and --!nonstrict modes.

I ran into a luau bug during this PR, and had to add a few ugly workarounds to the generator: luau-lang/luau#2384

I wanted to add @checked to functions in the ll module, but, I'm delaying that to a future PR for the following reasons:

  1. that would approximately triple the size of this PR.
  2. I'm unsure if i wanted to add @checked in the generator, or in the lsl_definitions.yaml file
  3. I need to better understand/document what @checked does so I can think about it for each ll function. I expect most or all ll functions will want @checked, but, I need to think about that another time
  4. I'd rather get to generating EmbeddedBuiltinDefinitions.cpp sooner rather than later, and this isn't really critical for that

@tapple tapple marked this pull request as draft May 9, 2026 20:31
@tapple tapple changed the title Add @checked annotations to secondlife.d.luau Add @checked annotations to secondlife.d.luau May 9, 2026
@tapple tapple marked this pull request as ready for review May 11, 2026 04:15
@tapple tapple marked this pull request as draft May 11, 2026 04:46
@tapple tapple marked this pull request as draft May 11, 2026 04:46
@tapple tapple force-pushed the @checked branch 4 times, most recently from cd74b9e to ef78e00 Compare June 1, 2026 04:19
@tapple tapple marked this pull request as ready for review June 17, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant