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;
|
||||
for (std::string& ss : results)
|
||||
{
|
||||
if (!first) {
|
||||
if (!first)
|
||||
{
|
||||
state.newline();
|
||||
state.emit("| ");
|
||||
}
|
||||
|
@ -799,7 +800,8 @@ struct TypeVarStringifier
|
|||
bool first = true;
|
||||
for (std::string& ss : results)
|
||||
{
|
||||
if (!first) {
|
||||
if (!first)
|
||||
{
|
||||
state.newline();
|
||||
state.emit("& ");
|
||||
}
|
||||
|
|
|
@ -136,8 +136,8 @@ TEST_CASE_FIXTURE(Fixture, "intersections_respects_use_line_breaks")
|
|||
opts.useLineBreaks = true;
|
||||
|
||||
//clang-format off
|
||||
CHECK_EQ("((number) -> number)"
|
||||
"\n& ((string) -> string)",
|
||||
CHECK_EQ("((number) -> number)\n"
|
||||
"& ((string) -> string)",
|
||||
toString(requireType("a"), opts));
|
||||
//clang-format on
|
||||
}
|
||||
|
@ -152,9 +152,9 @@ TEST_CASE_FIXTURE(Fixture, "unions_respects_use_line_breaks")
|
|||
opts.useLineBreaks = true;
|
||||
|
||||
//clang-format off
|
||||
CHECK_EQ("boolean"
|
||||
"\n| number"
|
||||
"\n| string",
|
||||
CHECK_EQ("boolean\n"
|
||||
"| number\n"
|
||||
"| string",
|
||||
toString(requireType("a"), opts));
|
||||
//clang-format on
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue