Skip to content

Commit 9a3eac0

Browse files
author
Dart CI
committed
Version 2.19.0-371.0.dev
Merge 2794cb9 into dev
2 parents c6e0307 + 2794cb9 commit 9a3eac0

File tree

89 files changed

+5429
-4404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+5429
-4404
lines changed

.github/ISSUE_TEMPLATE/2_cherry_pick.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,28 @@ body:
1313
id: commit_hash
1414
attributes:
1515
label: Commit(s) to merge
16-
description: What are the shortened commit hash(es) that have been merged to main?
16+
description: What are the commit hash(es) that have been merged to main?
1717
validations:
1818
required: true
1919
- type: input
2020
id: target
2121
attributes:
2222
label: Target
23-
description: Should this be cherry-picked to beta, stable or both??
23+
description: Should this be cherry-picked to beta, stable or both?
24+
validations:
25+
required: true
26+
- type: input
27+
id: changelist
28+
attributes:
29+
label: Prepared changelist for beta/stable
30+
description: Gerrit changelist against beta/stable per https://github.com/dart-lang/sdk/wiki/Cherry-picks-to-a-release-channel
2431
validations:
2532
required: true
2633
- type: textarea
2734
id: issue_description
2835
attributes:
2936
label: Issue Description
30-
description: Brief description of the issue. What is the issue? What platforms are the problems occurring on?
37+
description: Brief description of the issue. What is the issue? What platforms are the problems occurring on?
3138
validations:
3239
required: true
3340
- type: textarea
@@ -59,7 +66,7 @@ body:
5966
id: original_issue
6067
attributes:
6168
label: Issue link(s)
62-
description: Add links to the original issues fixed by this cp
69+
description: Add links to the original issues fixed by this cherry-pick
6370
validations:
6471
required: true
6572
- type: textarea

pkg/analysis_server/lib/src/lsp/handlers/handler_folding.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ class FoldingHandler
9090
/// that another starts. In this case, we shrink the previous range (and if
9191
/// this makes it a single line, remove it).
9292
void _compensateForLineFolding(List<FoldingRange> foldingRanges) {
93-
// Loop over items expect last (`-1`). We can skip the last item because
93+
// Loop over items except last (`-1`). We can skip the last item because
9494
// it has no next item.
9595
for (var i = 0; i < foldingRanges.length - 1; i++) {
9696
final range = foldingRanges[i];
9797
final next = foldingRanges[i + 1];
98-
// If this item runs into the next...
99-
if (range.endLine >= next.startLine) {
98+
// If this item runs into the next but does not completely enclose it...
99+
if (range.endLine >= next.startLine && range.endLine <= next.endLine) {
100100
// Truncate it to end on the line before.
101101
final newEndLine = next.startLine - 1;
102102

pkg/analysis_server/test/lsp/folding_test.dart

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,45 @@ class FoldingTest extends AbstractLspAnalysisServerTest {
242242
});
243243
}
244244

245+
Future<void> test_nested() async {
246+
final content = '''
247+
class MyClass2 {/*[0*/
248+
void f() {/*[1*/
249+
void g() {/*[2*/
250+
//
251+
/*2]*/}
252+
/*1]*/}
253+
/*0]*/}
254+
''';
255+
256+
await computeRanges(content);
257+
expectRanges({
258+
0: noFoldingKind,
259+
1: noFoldingKind,
260+
2: noFoldingKind,
261+
});
262+
}
263+
264+
Future<void> test_nested_lineFoldingOnly() async {
265+
lineFoldingOnly = true;
266+
final content = '''
267+
class MyClass2 {/*[0*/
268+
void f() {/*[1*/
269+
void g() {/*[2*/
270+
//
271+
/*2]*/}
272+
/*1]*/}
273+
/*0]*/}
274+
''';
275+
276+
await computeRanges(content);
277+
expectRanges({
278+
0: noFoldingKind,
279+
1: noFoldingKind,
280+
2: noFoldingKind,
281+
});
282+
}
283+
245284
Future<void> test_nonDartFile() async {
246285
await computeRanges(simplePubspecContent, uri: pubspecFileUri);
247286
expectNoRanges();

pkg/compiler/lib/src/inferrer/abstract_value_domain.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,5 +634,5 @@ abstract class AbstractValueDomain {
634634
/// Serializes this [value] for this domain to [sink].
635635
// TODO(48820): Remove covariant when DataSinkWriter is migrated.
636636
void writeAbstractValueToDataSink(
637-
covariant DataSinkWriter sink, AbstractValue value);
637+
covariant DataSinkWriter sink, AbstractValue? value);
638638
}

pkg/compiler/lib/src/inferrer/builder.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import '../options.dart';
2727
import '../universe/selector.dart';
2828
import '../universe/side_effects.dart';
2929
import '../util/util.dart';
30-
import 'engine_interfaces.dart';
30+
import 'engine.dart';
3131
import 'locals_handler.dart';
3232
import 'type_graph_nodes.dart';
3333
import 'type_system.dart';
@@ -1076,7 +1076,7 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation?>
10761076

10771077
TypeInformation _handleDynamic(
10781078
CallType callType,
1079-
ir.Node node,
1079+
ir.TreeNode node,
10801080
Selector selector,
10811081
AbstractValue? mask,
10821082
TypeInformation receiverType,
@@ -1107,7 +1107,7 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation?>
11071107
}
11081108

11091109
TypeInformation handleDynamicGet(
1110-
ir.Node node,
1110+
ir.TreeNode node,
11111111
Selector selector,
11121112
AbstractValue? mask,
11131113
TypeInformation receiverType,
@@ -1117,7 +1117,7 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation?>
11171117
}
11181118

11191119
TypeInformation handleDynamicSet(
1120-
ir.Node node,
1120+
ir.TreeNode node,
11211121
Selector selector,
11221122
AbstractValue? mask,
11231123
TypeInformation receiverType,
@@ -1130,7 +1130,7 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation?>
11301130

11311131
TypeInformation handleDynamicInvoke(
11321132
CallType callType,
1133-
ir.Node node,
1133+
ir.TreeNode node,
11341134
Selector selector,
11351135
AbstractValue? mask,
11361136
TypeInformation receiverType,

pkg/compiler/lib/src/inferrer/closure_tracer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ library compiler.src.inferrer.closure_tracer;
77
import '../common/names.dart' show Identifiers, Names;
88
import '../elements/entities.dart';
99
import 'debug.dart' as debug;
10-
import 'engine_interfaces.dart';
10+
import 'engine.dart';
1111
import 'node_tracer.dart';
1212
import 'type_graph_nodes.dart';
1313

0 commit comments

Comments
 (0)