blob: 80eeb88ac4f076454811e1cc4aea716764ab815c [file] [log] [blame]
40 columns |
>>> Empty record.
( ) x;
<<<
() x;
>>> Empty nullable record type.
( ) ? x;
<<<
()? x;
>>> Nullable record type.
( int , bool ) ? x;
<<<
(int, bool)? x;
>>> Single positional field.
( int , ) x;
<<<
(int,) x;
>>> Single named field.
( { int n } ) x;
<<<
({int n}) x;
>>> Named positional fields.
( int value , String label) x;
<<<
(int value, String label) x;
>>> Unnamed positional fields.
( int , String ) x;
<<<
(int, String) x;
>>> Named fields.
( { int value , String label } ) x;
<<<
({int value, String label}) x;
>>> Split between the type and the name.
( VeryVeryLongType_____ veryLongName___________________ , ) x;
<<<
(
VeryVeryLongType_____
veryLongName___________________,
)
x;
>>> Split named positional fields.
( int longValue , String veryVeryLongLabel , ) x;
<<<
(
int longValue,
String veryVeryLongLabel,
)
x;
>>> Unsplit unnamed positional fields have no trailing comma.
( int , String , ) x;
<<<
(int, String) x;
>>> Split only named fields.
( { int longValue , String anotherLongLabel , } ) x;
<<<
({
int longValue,
String anotherLongLabel,
})
x;
>>> Empty record types don't split.
someLongFunctionName__________________(() x) {}
<<<
someLongFunctionName__________________(
() x,
) {}
>>> Unsplit short single positional field.
(TypeName,
)
x;
<<<
(TypeName,) x;
>>> Unsplit single positional field.
(VeryLongTypeName________________,) x;
<<<
(VeryLongTypeName________________,) x;
>>> Split positional types.
(TypeName1,TypeName2,TypeName3,TypeName4) x;
<<<
(
TypeName1,
TypeName2,
TypeName3,
TypeName4,
)
x;
>>> Split named types.
({TypeName a,TypeName b,TypeName c,TypeName d}) x;
<<<
({
TypeName a,
TypeName b,
TypeName c,
TypeName d,
})
x;
>>> Split named if positional splits.
(TypeName,TypeName,TypeName,TypeName,{TypeName a,TypeName b}) x;
<<<
(
TypeName,
TypeName,
TypeName,
TypeName, {
TypeName a,
TypeName b,
})
x;
>>> Split positional if named splits.
(TypeName,TypeName,{TypeName a,TypeName b,TypeName c,TypeName d}) x;
<<<
(
TypeName,
TypeName, {
TypeName a,
TypeName b,
TypeName c,
TypeName d,
})
x;
>>> Single named field has no trailing comma.
({int n,}) x;
<<<
({int n}) x;
>>> Multiple positional fields have no trailing comma.
(int m, int n,) x;
<<<
(int m, int n) x;
>>> Split outer record if inner record splits.
((TypeName,TypeName,TypeName,TypeName),TypeName) x;
<<<
(
(
TypeName,
TypeName,
TypeName,
TypeName,
),
TypeName,
)
x;
>>> Split outer type argument list if inner record splits.
Map<String, (TypeName,TypeName,TypeName,TypeName)> map;
<<<
Map<
String,
(
TypeName,
TypeName,
TypeName,
TypeName,
)
>
map;