Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [3.7.0, dev]
sdk: [3.10.0, dev]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ description: >-
Provides an API and a CLI tool.
repository: https://github.com/dart-lang/dart_style
environment:
sdk: ^3.7.0
sdk: ^3.10.0

dependencies:
analyzer: ^8.1.0
analyzer: ^8.4.0
args: ^2.0.0
collection: ^1.19.0
package_config: ^2.1.0
Expand Down
7 changes: 3 additions & 4 deletions test/tall/expression/collection_null_aware.stmt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
40 columns |
(experiment null-aware-elements)
>>> List element.
var list = [ ? x ];
<<< 3.8
Expand Down Expand Up @@ -27,7 +26,7 @@ var list = [
?(veryLongExpression +
thatIsForcedToSplit),
];
>>> (experiment dot-shorthands) Preserves space for dot shorthand.
>>> Preserves space for dot shorthand.
### If the space between `?` and `.` is removed, it would become a single `?.`
### token and thus a parse error.
var list = [
Expand All @@ -41,12 +40,12 @@ var list = [
?.invocation(),
?.new(),
];
>>> (experiment dot-shorthands) Ambiguous dot shorthand versus null-aware.
>>> Ambiguous dot shorthand versus null-aware.
### Because there is no space in "?.", it must be a null-aware access in a map.
c = { e1 ?. e2 : e3 };
<<< 3.10
c = {e1?.e2: e3};
>>> (experiment dot-shorthands) Ambiguous dot shorthand versus null-aware.
>>> Ambiguous dot shorthand versus null-aware.
### Because there is a space in "? .", it must be a dot shorthand in a set.
c = { e1 ? . e2 : e3 };
<<< 3.10
Expand Down
3 changes: 1 addition & 2 deletions test/tall/expression/collection_null_aware_comment.stmt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
40 columns |
(experiment null-aware-elements)
>>> Inline comment after `?`.
var list = [ ? /* c */ x ];
<<< 3.8
Expand Down Expand Up @@ -33,7 +32,7 @@ var map = {
? // c
value,
};
>>> (experiment dot-shorthands) Comment between `?` and `.` of dot shorthand.
>>> Comment between `?` and `.` of dot shorthand.
var list = [
? /* c */ . property ,
? // c
Expand Down
25 changes: 12 additions & 13 deletions test/tall/invocation/dot_shorthand.stmt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
40 columns |
(experiment dot-shorthands)
>>> Getter.
variable = . getter;
<<< 3.9
<<< 3.10
variable = .getter;
>>> Method call with unsplit arguments.
variable = .method(1,x:2,3,y:4);
<<< 3.9
<<< 3.10
variable = .method(1, x: 2, 3, y: 4);
>>> Method call with split arguments.
variable = .method(one, x: two, three, y: four);
<<< 3.9
<<< 3.10
variable = .method(
one,
x: two,
Expand All @@ -19,34 +18,34 @@ variable = .method(
);
>>> Generic method call.
variable = . method < int , String > ( ) ;
<<< 3.9
<<< 3.10
variable = .method<int, String>();
>>> Constructor.
variable = .new(1);
<<< 3.9
<<< 3.10
variable = .new(1);
>>> Const constructor.
variable = const . new ( );
<<< 3.9
<<< 3.10
variable = const .new();
>>> Const named constructor.
variable = const . named ( );
<<< 3.9
<<< 3.10
variable = const .named();
>>> Unsplit selector chain.
v = . property . method() . x . another();
<<< 3.9
<<< 3.10
v = .property.method().x.another();
>>> Split selector chain on shorthand getter.
variable = .shorthand.method().another().third();
<<< 3.9
<<< 3.10
variable = .shorthand
.method()
.another()
.third();
>>> Split selector chain on shorthand method.
variable = .shorthand().method().getter.another().third();
<<< 3.9
<<< 3.10
variable = .shorthand()
.method()
.getter
Expand All @@ -55,7 +54,7 @@ variable = .shorthand()
>>> Split in shorthand method call argument list.
context(.shorthand(argument, anotherArgument, thirdArgument)
.chain().another().third().fourthOne());
<<< 3.9
<<< 3.10
context(
.shorthand(
argument,
Expand All @@ -69,7 +68,7 @@ context(
);
>>> Nested call.
.method(.getter,.method(.new(.new())),const.ctor());
<<<
<<< 3.10
.method(
.getter,
.method(.new(.new())),
Expand Down
9 changes: 4 additions & 5 deletions test/tall/invocation/dot_shorthand_comment.stmt
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
40 columns |
(experiment dot-shorthands)
>>> Line comment after dot.
variable = . // Comment.
whoDoesThis();
<<< 3.9
<<< 3.10
variable =
. // Comment.
whoDoesThis();
>>> Block comment after dot.
variable = ./* Comment. */whoDoesThis();
<<< 3.9
<<< 3.10
variable =
. /* Comment. */ whoDoesThis();
>>> Line comment after `const`.
variable = const // Comment.
. whoDoesThis();
<<< 3.9
<<< 3.10
variable =
const // Comment.
.whoDoesThis();
>>> Block comment after `const`.
variable = const/* Comment. */.whoDoesThis();
<<< 3.9
<<< 3.10
variable =
const /* Comment. */ .whoDoesThis();
Loading