mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Remove explicit bool type hack.
During the fix for https://github.com/dart-lang/language/issues/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 Change-Id: Ied468b17dafa03075fd54c0df915e0a539420697 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212266 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
ebcf042ed2
commit
4a54307a39
|
@ -11,7 +11,7 @@
|
|||
"constraint, update this by running tools/generate_package_config.dart."
|
||||
],
|
||||
"configVersion": 2,
|
||||
"generated": "2021-09-01T12:41:37.776425",
|
||||
"generated": "2021-09-07T14:56:54.026010",
|
||||
"generator": "tools/generate_package_config.dart",
|
||||
"packages": [
|
||||
{
|
||||
|
@ -761,7 +761,7 @@
|
|||
"name": "vm",
|
||||
"rootUri": "../pkg/vm",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
"languageVersion": "2.15"
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
|
|
|
@ -315,13 +315,7 @@ class AnnotateKernel extends RecursiveVisitor {
|
|||
Constant? constantValue;
|
||||
bool isInt = false;
|
||||
|
||||
// Note: the explicit type `bool` is needed because the checked-in version
|
||||
// of the CFE that we use for bootstrapping doesn't yet have constructor
|
||||
// tearoffs enabled, and the fix for bug
|
||||
// https://github.com/dart-lang/language/issues/1785 only takes effect when
|
||||
// constructor tearoffs are enabled. TODO(paulberry): remove the type after
|
||||
// the bootstrap CFE enables constructor tearoffs.
|
||||
final bool nullable = type is NullableType;
|
||||
final nullable = type is NullableType;
|
||||
if (nullable) {
|
||||
type = type.baseType;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ description: VM specific Dart code and helper scripts
|
|||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
args: ^1.4.4
|
||||
|
|
Loading…
Reference in a new issue