Update to analyzer 0.38.3. (#844)
Now that it correctly parses method chains with null assertion
operators, add some more tests around that.
diff --git a/pubspec.lock b/pubspec.lock
index b53d5f0..a2c3dca 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,7 +7,7 @@
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
- version: "0.38.1"
+ version: "0.38.3"
archive:
dependency: transitive
description:
@@ -70,7 +70,7 @@
name: crypto
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.2"
+ version: "2.1.3"
csslib:
dependency: transitive
description:
@@ -84,7 +84,7 @@
name: front_end
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.23"
+ version: "0.1.25"
glob:
dependency: transitive
description:
@@ -147,7 +147,7 @@
name: kernel
url: "https://pub.dartlang.org"
source: hosted
- version: "0.3.23"
+ version: "0.3.25"
matcher:
dependency: transitive
description:
@@ -182,7 +182,7 @@
name: node_preamble
url: "https://pub.dartlang.org"
source: hosted
- version: "1.4.6"
+ version: "1.4.8"
package_config:
dependency: transitive
description:
@@ -308,21 +308,21 @@
name: test
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.7"
+ version: "1.6.10"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.6"
+ version: "0.2.7"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.8"
+ version: "0.2.9+1"
test_descriptor:
dependency: "direct dev"
description:
@@ -350,7 +350,7 @@
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.1"
+ version: "2.0.0"
watcher:
dependency: transitive
description:
@@ -371,6 +371,6 @@
name: yaml
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.16"
+ version: "2.2.0"
sdks:
dart: ">=2.3.0 <3.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index fc607c1..7be40d0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -11,7 +11,7 @@
sdk: '>=2.3.0 <3.0.0'
dependencies:
- analyzer: '>=0.38.0 <0.39.0'
+ analyzer: '>=0.38.3 <0.39.0'
args: '>=0.12.1 <2.0.0'
path: ^1.0.0
source_span: ^1.4.0
diff --git a/test/splitting/invocations.stmt b/test/splitting/invocations.stmt
index 071b3a8..3ad0cd8 100644
--- a/test/splitting/invocations.stmt
+++ b/test/splitting/invocations.stmt
@@ -400,11 +400,25 @@
.another!
.aThird!
.longerPropertyChain;
+>>> "!" stays with operand before index
+verylongIdentifier![i]![j].longIdentifier[i][j].another[i]![j].aThird!;
+<<<
+verylongIdentifier![i]![j]
+ .longIdentifier[i][j]
+ .another[i]![j]
+ .aThird!;
+>>> "!" stays with operand before call
+verylongIdentifier!(i)!(j).longIdentifier(i)(j).another(i)!(j).aThird!;
+<<<
+verylongIdentifier!(i)!(j)
+ .longIdentifier(i)(j)
+ .another(i)!(j)
+ .aThird!;
>>> do not split null-asserted chained calls if not needed
compiler!.a().b()!.c.d();
<<<
compiler!.a().b()!.c.d();
->>> null-aware in block calls
+>>> null-assert in block calls
compiler!.a(() {;})!.b(() {;})!;
<<<
compiler!.a(() {
diff --git a/test/whitespace/expressions.stmt b/test/whitespace/expressions.stmt
index 7dd8ded..2913271 100644
--- a/test/whitespace/expressions.stmt
+++ b/test/whitespace/expressions.stmt
@@ -149,7 +149,9 @@
obj.prop!;
>>> null assertion in method chain
obj ! . getter ! . method ( arg ) ! + 3;
-// TODO: ![ and !(
<<<
obj!.getter!.method(arg)! + 3;
-// TODO: ![ and !(
\ No newline at end of file
+>>> null assertion before index and call operators
+obj ! [ index ] ! ( call ) ! + 3;
+<<<
+obj![index]!(call)! + 3;
\ No newline at end of file