diff --git a/spec/declaration/local_type_spec.lua b/spec/declaration/local_type_spec.lua index e9c0aa506..59a2c88c2 100644 --- a/spec/declaration/local_type_spec.lua +++ b/spec/declaration/local_type_spec.lua @@ -212,4 +212,23 @@ describe("local type", function() { y = 15, x = 42, msg = 'in record field: first: got string "first", expected integer' }, { y = 15, x = 60, msg = 'in record field: second: got integer, expected string' }, })) + + it("resolves type arguments in nested types correctly (#754)", util.check_type_error([[ + local record MyNamespace + record MyGenericRecord + Data: T + end + end + + local enum MyEnum + "foo" + "bar" + end + + local type MyAlias = MyNamespace.MyGenericRecord + + local t: MyAlias = { Data = "invalid" } + ]], { + { y = 14, msg = 'in record field: Data: string "invalid" is not a member of MyEnum' } + })) end)