mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
String to make sure interp strings with no expressions are compiled as strings
This commit is contained in:
parent
efe3b7ca36
commit
cfe339f994
1 changed files with 8 additions and 1 deletions
|
@ -1234,6 +1234,13 @@ RETURN R0 0
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("InterpStringWithNoExpressions")
|
||||||
|
{
|
||||||
|
ScopedFastFlag sff{"LuauInterpolatedStringBaseSupport", true};
|
||||||
|
|
||||||
|
CHECK_EQ(compileFunction0(R"(return "hello")"), compileFunction0("return `hello`"));
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("ConstantFoldArith")
|
TEST_CASE("ConstantFoldArith")
|
||||||
{
|
{
|
||||||
CHECK_EQ("\n" + compileFunction0("return 10 + 2"), R"(
|
CHECK_EQ("\n" + compileFunction0("return 10 + 2"), R"(
|
||||||
|
@ -2386,7 +2393,7 @@ TEST_CASE("DebugLineInfoRepeatUntil")
|
||||||
local f = 0
|
local f = 0
|
||||||
repeat
|
repeat
|
||||||
f += 1
|
f += 1
|
||||||
if f == 1 then
|
if f == 1 then
|
||||||
print(f)
|
print(f)
|
||||||
else
|
else
|
||||||
f = 0
|
f = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue