diff --git a/tl.lua b/tl.lua index 8f6a7346f..3732c0353 100644 --- a/tl.lua +++ b/tl.lua @@ -12391,6 +12391,9 @@ self:expand_type(node, values, elements) }) local function ensure_is_method_self(typ, fargs) assert(typ.declname) local selfarg = fargs[1] + if selfarg.typename == "self" then + return true + end if not (selfarg.typename == "nominal") then return false end diff --git a/tl.tl b/tl.tl index f7d17473f..1c941ded3 100644 --- a/tl.tl +++ b/tl.tl @@ -12391,6 +12391,9 @@ do local function ensure_is_method_self(typ: RecordLikeType, fargs: {Type}): boolean assert(typ.declname) local selfarg = fargs[1] + if selfarg is SelfType then + return true + end if not selfarg is NominalType then return false end