A crash occurs when a type function returns a recursive parameter (as itself, or as part of another type) of a function-type that has an annotated return type which returns a singleton-type that is resolved inside the function.
Minimum Reproduction Code:
--!strict
type Foo = typeof(function(a: Foo): () -- Only crashes when a return type is annotated
return "" -- Only crashes with singleton types, and only when it needs to be resolved within the function
end)
type function TypeFunc(ty)
return ty -- Only crashes when the recursive parameter is returned
end
type FooFromTypeFunc = TypeFunc<Foo>
System Information:
- Windows 11 Pro 25H2
- AMD Ryzen 7 5700X3D 8-Core Processor
- 32 GB DDR4
- AMD Radeon RX 5700 XT
Crash dump is included in the private message attached to this bug report.
A private message is associated with this bug report