Skip to content

Sync to upstream/release/711#2280

Merged
aatxe merged 5 commits intomasterfrom
merge
Mar 6, 2026
Merged

Sync to upstream/release/711#2280
aatxe merged 5 commits intomasterfrom
merge

Conversation

@aatxe
Copy link
Member

@aatxe aatxe commented Mar 6, 2026

Hi there, folks! We're back with another weekly Luau release!

Language

  • Adds the const keyword for defining constant bindings that are statically forbidden to be reassigned to. This implements luau-lang/rfcs#166.
  • Adds a collection of new math constants to Luau's math library per luau-lang/rfcs#169.

Analysis

  • Fixes a class of bugs where Luau would not retain reasonable upper or lower bounds on free types, resulting in types snapping to never or unknown despite having bounds.
--!strict
-- `lines` will be inferred to be of `{ string }` now, and prior
-- was 
local lines = {}
table.insert(lines, table.concat({}, ""))
print(table.concat(lines, "\n"))
--!strict
-- `buttons` will be inferred to be of type `{ { a: number } }`
local buttons = {}
table.insert(buttons, { a = 1 })
table.insert(buttons, { a = 2, b = true })
table.insert(buttons, { a = 3 })
  • Disables the type error from string.format when called with a dynamically-determined format string (i.e. a non-literal string argument with the type string) in response to user feedback about it being too noisy.
  • Resolves an ICE that could occur when type checking curried generic functions. Fixes attempting to modify bounds of a potentially visited generic #2061!
  • Fixes false positive type errors from doing equality or inequality against nil when indexing from a table
  • In pass a state parameter to useratom #2256, adds a state parameter to the useratom callback for consistency with other callbacks.

Compiler

Native Code Generation

  • Fixes a bug where some operations on x86_64 would produce integers that would take up more than 32-bits when a 32-bit integer is expected. We resolve these issues by properly truncating to 32-bits in these situations.
  • Improves dead store elimination for conditional jumps and fastcalls arguments, improving overall native codegen performance by about 2% on average in benchmarks, with some benchmarks as high as 25%.

@aatxe aatxe merged commit 004d88f into master Mar 6, 2026
8 checks passed
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.

attempting to modify bounds of a potentially visited generic

3 participants