The only difference is that in patchset 1, without realizing it, I took advantage of the fact that named and positional arguments may be specified in arbitrary order; in patchset 2, I didn't. There are no other differences, and patchset 1 failed trybots.
Here is the relevant line of code, from patchset 1:
The code at line 165 of package:front_end/src/fasta/type_inference/inference_visitor_base.dart 2655 is trying to hoist the receiver of a method call (presumably the receiver is the implicit this in the call to parsePattern). It calls createVariable as part of the hoisting, which asserts because it is expecting the receiver not to be a this expression.
The assertion failure doesn't occur during compilation of the parser; it only occurs in the unit test pkg/frontend_server/test/frontend_server_test. I'm guessing this is because during the build process, the compiler we are using to compile the compiler has assertions disabled.
Repro steps
I was able to reproduce this failure locally on my Linux box by checking out patchset 1 using:
I'm not sure how to reproduce this with a small test case, but I have reliable repro steps (see below).
Have a look at the difference between patchsets 1 and 2 in the following CL: https://dart-review.googlesource.com/c/sdk/+/273829/1..2
The only difference is that in patchset 1, without realizing it, I took advantage of the fact that named and positional arguments may be specified in arbitrary order; in patchset 2, I didn't. There are no other differences, and patchset 1 failed trybots.
Here is the relevant line of code, from patchset 1:
And here is the compiler stacktrace it leads to:
(the full stacktrace can be found at https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8795577674055193633/+/u/test_results/new_test_failures__logs_)
The code at line 165 of
package:front_end/src/fasta/type_inference/inference_visitor_base.dart 2655
is trying to hoist the receiver of a method call (presumably the receiver is the implicitthis
in the call toparsePattern
). It callscreateVariable
as part of the hoisting, which asserts because it is expecting the receiver not to be athis
expression.The assertion failure doesn't occur during compilation of the parser; it only occurs in the unit test
pkg/frontend_server/test/frontend_server_test
. I'm guessing this is because during the build process, the compiler we are using to compile the compiler has assertions disabled.Repro steps
I was able to reproduce this failure locally on my Linux box by checking out patchset 1 using:
Then building the SDK, then running: