... oh, this is already tested above actually.

This commit is contained in:
Arseny Kapoulkine 2023-11-27 13:04:02 -08:00
parent dcae3d4824
commit eaa1a368d2
2 changed files with 1 additions and 5 deletions

View file

@ -7850,12 +7850,10 @@ TEST_CASE("ArithRevK")
{
ScopedFastFlag sff("LuauCompileRevK", true);
// - and / have special optimized form for reverse constants
// in the future, + and * will likely get compiled to ADDK/MULK
// - and / have special optimized form for reverse constants; in the future, + and * will likely get compiled to ADDK/MULK
// other operators are not important enough to optimize reverse constant forms for
CHECK_EQ("\n" + compileFunction0(R"(
local x: number = unknown
return 2 + x, 2 - x, 2 * x, 2 / x, 2 % x, 2 // x, 2 ^ x
)"),
R"(

View file

@ -64,8 +64,6 @@ end
assert(vector(1, 2, 4) / 8 == vector(1/8, 1/4, 1/2));
assert(vector(1, 2, 4) / (1 / val) == vector(1/8, 2/8, 4/8));
assert(vector(1, 2, 4) / '8' == vector(1/8, 1/4, 1/2));
assert(vector(1, 2, 4) / 8 == vector(1/8, 1/4, 1/2));
assert(1 / vector(1, 2, 4) == vector(1, 1/2, 1/4));
assert(-vector(1, 2, 4) == vector(-1, -2, -4));