diff --git a/tl.lua b/tl.lua index 4d7ba7e82..9d6b90656 100644 --- a/tl.lua +++ b/tl.lua @@ -12407,6 +12407,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 95d31aa04..fd629cd1a 100644 --- a/tl.tl +++ b/tl.tl @@ -12407,6 +12407,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