From what I discovered the type solver just freaks out and evaluates to one of the types in the union when if validation is present.
Source:
--!strict
type Type1 = {
Type: "Type1",
CommonKey: string,
Type1Key: string,
}
type Type2 = {
Type: "Type2",
CommonKey: string,
Type2Key: string,
}
type UnionType = Type1 | Type2
local foo: UnionType = nil
if foo.Type == "Type2" then
foo.
end
Source:
--!strict
type Type1 = {
Type: "Type1",
CommonKey: string,
Type1Key: string,
}
type Type2 = {
Type: "Type2",
CommonKey: string,
Type2Key: string,
}
type UnionType = Type1 | Type2
local foo: UnionType? = nil
if foo then
if foo.Type == "Type2" then
foo.
end
end
MORE INFO:
- Tried both the new and the old solver. They both fail
- Uninstalled all plugins before testing.
- No significant beta feature related to type solver other than New Typesolver
- Using latest build of roblox studio as of posting this
Expected behavior
Expected behaviour should be type still getting correctly refined.

