Yeah, this one was really confusing. Why would it be trying to convert false to true? Not sure why an error would be raised here since TRUE and FALSE are both booleans
I didn’t even have memory issue, but autocomplete are broken for me.
The memory use should be more limited in the recent Studio update 644.
I would still suggest waiting for a few months more before enabling it on large projects with heavy use of strict typing as it can take a long time to complete, blocking auto-complete.
Can you please check if this still happens when you open your place in Studio version 644?
this is a great update! however it always crashes when i open a place file
This feature was causing my Roblox Studio to crash on start-up, it would seem. Though only when opening a specific place, our team uses a lot of Luau so I’m assuming some collision somewhere caused something to crash. I’m not even sure how that would work but something to look into. Thanks I’m excited for this change
We definitely ran into a few new crashes that we’ve been working hard on fixing with the beta release! We suspect the 646 release should contain the last of the fixes for the big batch of crashes we’ve seen so far. So, I’d recommend folks who had crashes to try again next week once 646 has been released for a bit (it takes time for us to get all the flags on and so forth), and let us know if they’re experiencing crashes still.
It’s possible you’re encountering one that is new and we haven’t seen yet, and we’ll definitely keep an eye out for new crashes and investigate them as best as we can. If you experience one and want to help out, opening a DevForum bug report that includes a description of the crash, explicitly notes that it was in the New Type Solver Beta, and includes (privately) the attached place file would be tremendously useful in helping us diagnose and resolve the crash expediently! Cheers!
This beta seems to not work on my end sadly. Whenever opening any place, even the template baseplate, my memory usage continues to increase until it’s used all that’s available. I can still use Roblox Studio during this, but the IntelliSense and autocomplete fail to work.
I’ve seen a few issues
- math operations in different closures (most if not all)
--!strict
--!strict
local i: number = 0
task.defer(function()
i = i + 1
if i >= 3 then
-- something
end
end)
i + 1
and i >= 3
triggers warnings, however changing it to i += 1
solves both issues
if i remove the task.defer
, it’s also fine.
So, typechecking for local variables in the same scope but seperate closure is very whack
- typeof() on generics
--!strict
local function sine<T>(amp: T, len: T, off: T, step: number?): T
if type(amp) ~= "number" and type(amp) ~= "vector" then error(`invalid argument #1 (number or vector expected, got {typeof(amp)})`) end
if typeof(len) ~= typeof(amp) then error(`invalid argument #2 ({typeof(amp)} expected, got {typeof(len)})`) end
if typeof(off) ~= typeof(amp) then error(`invalid argument #2 ({typeof(amp)} expected, got {typeof(off)})`) end
local x = step or os.clock() * 60
if type(amp) == "number" then
return amp * math.sin(x/len + 0.015707963267948967*off)
elseif typeof(amp) == "Vector3" then
if amp == Vector3.zero then return amp end
return amp * Vector3.new(
math.sin(x/len.X + 0.015707963267948967*off.X),
math.sin(x/len.Y + 0.015707963267948967*off.Y),
math.sin(x/len.Z + 0.015707963267948967*off.Z)
)
end
if amp == Vector2.zero then return amp end
return amp * Vector2.new(
math.sin(x/len.X + 0.015707963267948967*off.X),
math.sin(x/len.Y + 0.015707963267948967*off.Y)
)
end
this entire code is littered with warnings
-
Type function instance union<*blocked-1234*, nil> is uninhabited
on 3, 8, 10 -
Operator '== or ~=' could not be applied to operands of types string and *blocked-1234*; there is no corresponding overload for __eq
on 4, 5 -
Type function instance intersect<T, number> depends on generic function parameters but does not appear in the function signature; this construct cannot be type-checked at this time
on 9, 11-16, 19-23
- odd thing with tables
--!strict
local a = table.create(1)
a[1] = {}
table.insert(a[1], "test")
line 3 gives the error Type '{ }' could not be converted to 'nil'
line 4 gives the error None of the overloads for function that accept 2 arguments are compatible.
type solver seems to assume a[1] is nil for some reason
i first saw this issue with modules generated by Blink IDL, Queue
and Events
table create a ton of warnings with this same issue i just mentioned