[New solver] auto complete for tagged unions don't work correctly

while using

type Success =	{Code: "Success",	Success: true,	Data: any}
type Lock =		{Code: "Locked",	Success: false,	Lock: string}
type Error =	{Code: "Error",		Success: false,	Message: string}

local value = {} :: Success | Lock | Error

autocomplete is a bit finicky

here we can see it only shows Code as being "Success" when it should be "Error" | "Locked" | "Success"

inside a if check it works correctly

but only if there is no code after for example simply having then or end after prevents auto complete from showing

here is another example

but if i remove the end then it starts working

luau type engine seams to be working correctly but the problem seams to be on studios side
even a tab character after "" will prevent the popup from showing

Expected behavior

  1. tooltips should show tagged unions correctly
  2. if checks should still list valid unions even if there is code after ""

Thanks for the report!

There are a few interesting things going on here:

First, when you write value. on a line by itself, the editor is suggesting table keys that are definitely present in value. In this case, the properties are Code and Success. The Data, Lock, and Message fields may not be present and so autocomplete does not suggest them.

Secondly, there does seem to be a problem here where autocomplete is not activating when you type an opening quotation. As a workaround, you can manually open autocomplete by pressing ctrl-period. (or cmd-period on MacOS)

Someone on our team will look into fixing this.