Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Analysis/src/EmbeddedBuiltinDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare function type<T>(value: T): string
declare function typeof<T>(value: T): string

-- `assert` has a magic function attached that will give more detailed type information
declare function assert<T>(value: T, errorMessage: string?): T
declare function assert<T, Err...>(value: T, ...: Err...): (T, Err...)

@PhoenixWhitefire PhoenixWhitefire Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EmbeddedBuiltinDefinitions annotation for assert is effectively unused. In the Old Solver it has a magic type attached, and in the New Solver the definition is overwritten directly here:

addGlobalBinding(globals, "assert", assertTy, "@luau");

This is also the reason for the hover type hint in New Solver

image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, sorry for not being more thorough i'll update with tests and better support

declare function error<T>(message: T, level: number?): never

declare function tostring<T>(value: T): string
Expand Down
Loading