mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Apply suggestions from code review
Co-authored-by: Andy Friesen <andy.friesen@gmail.com>
This commit is contained in:
parent
bcae1e935c
commit
22e988207e
2 changed files with 9 additions and 7 deletions
|
@ -744,7 +744,8 @@ struct TypeVarStringifier
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (std::string& ss : results)
|
for (std::string& ss : results)
|
||||||
{
|
{
|
||||||
if (!first) {
|
if (!first)
|
||||||
|
{
|
||||||
state.newline();
|
state.newline();
|
||||||
state.emit("| ");
|
state.emit("| ");
|
||||||
}
|
}
|
||||||
|
@ -799,7 +800,8 @@ struct TypeVarStringifier
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (std::string& ss : results)
|
for (std::string& ss : results)
|
||||||
{
|
{
|
||||||
if (!first) {
|
if (!first)
|
||||||
|
{
|
||||||
state.newline();
|
state.newline();
|
||||||
state.emit("& ");
|
state.emit("& ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,8 +136,8 @@ TEST_CASE_FIXTURE(Fixture, "intersections_respects_use_line_breaks")
|
||||||
opts.useLineBreaks = true;
|
opts.useLineBreaks = true;
|
||||||
|
|
||||||
//clang-format off
|
//clang-format off
|
||||||
CHECK_EQ("((number) -> number)"
|
CHECK_EQ("((number) -> number)\n"
|
||||||
"\n& ((string) -> string)",
|
"& ((string) -> string)",
|
||||||
toString(requireType("a"), opts));
|
toString(requireType("a"), opts));
|
||||||
//clang-format on
|
//clang-format on
|
||||||
}
|
}
|
||||||
|
@ -152,9 +152,9 @@ TEST_CASE_FIXTURE(Fixture, "unions_respects_use_line_breaks")
|
||||||
opts.useLineBreaks = true;
|
opts.useLineBreaks = true;
|
||||||
|
|
||||||
//clang-format off
|
//clang-format off
|
||||||
CHECK_EQ("boolean"
|
CHECK_EQ("boolean\n"
|
||||||
"\n| number"
|
"| number\n"
|
||||||
"\n| string",
|
"| string",
|
||||||
toString(requireType("a"), opts));
|
toString(requireType("a"), opts));
|
||||||
//clang-format on
|
//clang-format on
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue