tl
tl copied to clipboard
[next branch] `where` conflicts with `<total>`
Code to reproduce:
local interface Op
op: string
end
local interface Binary
is Op
left: number
right: number
end
local record Add
is Binary
-- where self.op == '+' -- removing the comment triggers an error
end
local sum <total>: Add = {
op = '+',
left = 10,
right = 20
}
print(sum.op, sum.left, sum.right)