type A = {
x: number?,
}
type B = {
x: number?,
}
type C = A & B
local obj: C = {
x = 3,
}
local x: number = obj.x or 3
Take this code for example. This produces a warning:
even though it is completely valid code. This is an oversimplified example, but it happens in more complex scenarios as well.
Expected behavior
No error should be shown and (number? & number?) should simplify into just number?.
There are many more circumstances like this and it is just not to do with numbers, it could be any type.