Skip to content

Commit be57c7d

Browse files
stereotype441Commit Bot
authored and
Commit Bot
committed
Remove explicit bool type hack.
During the fix for dart-lang/language#1785, an explicit `bool` type was added to the variable `nullable` to ensure that it would properly participate in type promotion while the fix was still being rolled out. Now that the fix is in place, this explicit type is no longer needed. TEST=standard trybots, TAP global presubmit, Golem Change-Id: Ib81ad436876e576f85c929c205d5831214e6a05a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214821 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent ba29ef2 commit be57c7d

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

.dart_tool/package_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"constraint, update this by running tools/generate_package_config.dart."
1212
],
1313
"configVersion": 2,
14-
"generated": "2021-11-15T17:34:02.415038",
14+
"generated": "2021-12-09T13:52:42.287379",
1515
"generator": "tools/generate_package_config.dart",
1616
"packages": [
1717
{
@@ -760,7 +760,7 @@
760760
"name": "vm",
761761
"rootUri": "../pkg/vm",
762762
"packageUri": "lib/",
763-
"languageVersion": "2.12"
763+
"languageVersion": "2.15"
764764
},
765765
{
766766
"name": "vm_service",

pkg/vm/lib/transformations/type_flow/transformer.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,7 @@ class AnnotateKernel extends RecursiveVisitor {
315315
Constant? constantValue;
316316
bool isInt = false;
317317

318-
// Note: the explicit type `bool` is needed because the checked-in version
319-
// of the CFE that we use for bootstrapping doesn't yet have constructor
320-
// tearoffs enabled, and the fix for bug
321-
// https://github.com/dart-lang/language/issues/1785 only takes effect when
322-
// constructor tearoffs are enabled. TODO(paulberry): remove the type after
323-
// the bootstrap CFE enables constructor tearoffs.
324-
final bool nullable = type is NullableType;
318+
final nullable = type is NullableType;
325319
if (nullable) {
326320
type = type.baseType;
327321
}

pkg/vm/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: VM specific Dart code and helper scripts
44
publish_to: none
55

66
environment:
7-
sdk: '>=2.12.0 <3.0.0'
7+
sdk: '>=2.15.0 <3.0.0'
88

99
dependencies:
1010
args: ^2.0.0

0 commit comments

Comments
 (0)