Skip to content

Commit 9305f61

Browse files
committed
Test that private named initializing formals can be formatted.
This covers half of #1772, but I'll leave that open until primary constructors are implemented too so that I can ensure that we can format declaring field parameters as well.
1 parent e8190bf commit 9305f61

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/tall/declaration/constructor_parameter.unit

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,23 @@ class A {
9191
class A {
9292
A(covariant this.foo);
9393
}
94+
>>> Private named initializing formal.
95+
class A {
96+
A({this._x, required this._y, int? this._z});
97+
98+
int? _x;
99+
int? _y;
100+
int? _z;
101+
}
102+
<<<
103+
class A {
104+
A({
105+
this._x,
106+
required this._y,
107+
int? this._z,
108+
});
109+
110+
int? _x;
111+
int? _y;
112+
int? _z;
113+
}

0 commit comments

Comments
 (0)