diff --git a/tl.tl b/tl.tl index 421a6b702..263e43683 100644 --- a/tl.tl +++ b/tl.tl @@ -10004,6 +10004,8 @@ tl.type_check = function(ast: Node, opts: TypeCheckOptions): Result, string end node.type = BOOLEAN elseif node.op.op == ":" then + -- we handle ':' separately from '.' because ':' is specific to records, + -- so we produce different error messages if lax and (is_unknown(a) or a.typename == "typevar") then if node.e1.kind == "variable" then add_unknown_dot(node.e1, node.e1.tk .. "." .. node.e2.tk)