[New solver] Union of singletons acting strange

export type States = "Closed" | "Closing" | "Opening" | "Open"
export type MyType<A = any> = {
	State:		States,
	IsOpen:		boolean,
	Open:		(self: MyType<A>) -> (),
}

local value = {} :: MyType

function value:Open()
	if self.IsOpen == true then 
		
	elseif self.State == "Closing" or self.State == "Opening" then
		self:Open()
	end
end

if i change self.IsOpen == true to self.IsOpen it starts working

or if a split the or into elseif it also starts working

Hello! That looks like a bug in the new solver to me. We’ll try to keep you in the loop as a fix goes out here.

1 Like

Hello again! A fix should be on the way within the next few weeks, I’ll check back in once it rolls out.

2 Likes

Hello again! We rolled out a fix, and the snippet you shared now type checks in Roblox Studio without any errors. Please let us know if you run into any further issues!