mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Test unknown
This commit is contained in:
parent
e1d8f3acd3
commit
64351f8203
1 changed files with 13 additions and 0 deletions
|
@ -566,6 +566,19 @@ TEST_CASE_FIXTURE(BuiltinsFixture, "string_format_tostring_specifier")
|
|||
LUAU_REQUIRE_NO_ERRORS(result);
|
||||
}
|
||||
|
||||
TEST_CASE_FIXTURE(BuiltinsFixture, "string_format_tostring_specifier_type_constraint")
|
||||
{
|
||||
CheckResult result = check(R"(
|
||||
local function f(x): string
|
||||
local _ = string.format("%*", x)
|
||||
return x
|
||||
end
|
||||
)");
|
||||
|
||||
LUAU_REQUIRE_NO_ERRORS(result);
|
||||
CHECK_EQ("(string) -> string", toString(requireType("f")));
|
||||
}
|
||||
|
||||
TEST_CASE_FIXTURE(BuiltinsFixture, "xpcall")
|
||||
{
|
||||
CheckResult result = check(R"(
|
||||
|
|
Loading…
Add table
Reference in a new issue