Migrated language/bool tests expect TypeError when null value is used
in a condition (which is still possible if static type of condition is
dynamic). This is right in NNBD strong mode, as implicit cast of null
to bool will fail with TypeError. However, in NNBD weak mode implicit
cast passes, and then AssertionError is thrown as before.
Before migration language_2/bool tests expected AssertionError.
This change forks the tests to behave differently in weak and strong
modes.
Change-Id: Iaba9e606bafe5740a998a60a74a6b54e38cac86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141800
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.
Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>