Typing too quickly in a type function can sometimes crash the typechecker

As of version 0.662, typing too fast in the body of a type function can cause the solver to crash, with the message “Analysis has been cancelled by user”, making it difficult to write code quickly without the solver crashing.
This bug occurs quite rarely, but appears to happen more often the longer a type function runs.

--!strict
type function func()
	for i = 1, 10000000 do
	end
	--spamming in this string appears to crash quite consistently
	error('')
end
local _:func<>

Repro file:
analysisCancelTest.rbxl (54.8 KB)

2 Likes

Thank you for the report.

We were able to reproduce the issue and will be working to resolve it.

Thank you again for reporting this issue! We’ve made a number of improvements to how Studio interacts with cancellation of typechecks, and I can confirm that on Studio 672, this issue is now fixed. Please don’t hesitate to report any other issues you run into! Cheers! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.