From 358ae88ba6ae0d0d4f87a640dbc65552f4c5f0f4 Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Tue, 21 Jan 2025 02:52:22 -0800 Subject: [PATCH] Move pkg/kernel to language version 3.6 This is in preparation for https://dart-review.googlesource.com/c/sdk/+/397164 as packages in a workspace need a recent language version. Change-Id: If1926192209353fab934efe702391ea10ed3573c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404581 Reviewed-by: Johnni Winther Commit-Queue: Sigurd Meldgaard --- pkg/kernel/lib/testing/type_parser_environment.dart | 4 ++-- pkg/kernel/lib/type_environment.dart | 6 +++--- pkg/kernel/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/kernel/lib/testing/type_parser_environment.dart b/pkg/kernel/lib/testing/type_parser_environment.dart index 849c8818c6cc..c8002ec78581 100644 --- a/pkg/kernel/lib/testing/type_parser_environment.dart +++ b/pkg/kernel/lib/testing/type_parser_environment.dart @@ -217,7 +217,7 @@ class TypeParserEnvironment { /* TreeNode | StructuralParameter */ Object lookupDeclaration(String name) { Object? result = _declarations[name]; if (result == null && _parent != null) { - return _parent!.lookupDeclaration(name); + return _parent.lookupDeclaration(name); } if (result == null) throw "Not found: $name"; return result; @@ -266,7 +266,7 @@ class TypeParserEnvironment { /// Use this in subclasses to add support for additional predefined types. DartType? getPredefinedNamedType(String name) { if (_parent != null) { - return _parent!.getPredefinedNamedType(name); + return _parent.getPredefinedNamedType(name); } return null; } diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart index 8b70028dc3f9..dc38a6e24963 100644 --- a/pkg/kernel/lib/type_environment.dart +++ b/pkg/kernel/lib/type_environment.dart @@ -953,7 +953,7 @@ class StaticTypeContextImpl implements StaticTypeContext { @override DartType getExpressionType(Expression node) { if (_cache != null) { - return _cache!.getExpressionType(node, this); + return _cache.getExpressionType(node, this); } else { return node.getStaticTypeInternal(this); } @@ -962,7 +962,7 @@ class StaticTypeContextImpl implements StaticTypeContext { @override DartType getForInIteratorType(ForInStatement node) { if (_cache != null) { - return _cache!.getForInIteratorType(node, this); + return _cache.getForInIteratorType(node, this); } else { return node.getIteratorTypeInternal(this); } @@ -971,7 +971,7 @@ class StaticTypeContextImpl implements StaticTypeContext { @override DartType getForInElementType(ForInStatement node) { if (_cache != null) { - return _cache!.getForInElementType(node, this); + return _cache.getForInElementType(node, this); } else { return node.getElementTypeInternal(this); } diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml index 36692d718a56..ae32d0191467 100644 --- a/pkg/kernel/pubspec.yaml +++ b/pkg/kernel/pubspec.yaml @@ -6,7 +6,7 @@ name: kernel publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.6.0 # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: