Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e205126

Browse files
author
Dart CI
committed
Version 2.19.0-247.0.dev
Merge 6945a72 into dev
2 parents f6a5b29 + 6945a72 commit e205126

File tree

233 files changed

+7068
-2759
lines changed

Some content is hidden

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

233 files changed

+7068
-2759
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ Updated the Linter to `1.28.0`, which includes changes that
152152

153153
## 2.18.2 - 2022-09-28
154154

155-
This is a patch release that fixes incorrect behavior in `Uri.parse`.
155+
This is a patch release that:
156+
157+
- fixes incorrect behavior in `Uri.parse`.
158+
- fixes a compiler crash (issue [#50052][]).
156159

157160
### Libraries
158161

@@ -165,6 +168,8 @@ This is a patch release that fixes incorrect behavior in `Uri.parse`.
165168
The Dart `Uri` class is still not an implementation of the same standard
166169
as the browser's `URL` implementation.
167170

171+
[#50052]: https://github.com/dart-lang/sdk/issues/50052
172+
168173
## 2.18.1 - 2022-09-14
169174

170175
This is a patch release that fixes a crash caused by incorrect type inference

build/toolchain/win/BUILD.gn

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ assert(is_win)
2222
# This tool will is used as a wrapper for various commands below.
2323
tool_wrapper_path = rebase_path("tool_wrapper.py", root_build_dir)
2424

25+
ninja_path = rebase_path("//buildtools/ninja/ninja")
26+
2527
if (use_goma) {
2628
goma_prefix = "$goma_dir/gomacc.exe "
2729
} else {
@@ -72,7 +74,7 @@ template("msvc_toolchain") {
7274
# TODO(brettw) enable this when GN support in the binary has been rolled.
7375
#precompiled_header_type = "msvc"
7476
pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb"
75-
command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
77+
command = "$ninja_path -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
7678
depsformat = "msvc"
7779
description = "CC {{output}}"
7880
outputs = [
@@ -93,7 +95,7 @@ template("msvc_toolchain") {
9395
if (is_clang && invoker.current_cpu == "x86") {
9496
flags = "-m32"
9597
}
96-
command = "ninja -t msvc -e $env -- $cl $flags /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
98+
command = "$ninja_path -t msvc -e $env -- $cl $flags /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
9799
depsformat = "msvc"
98100
description = "CXX {{output}}"
99101
outputs = [

pkg/_fe_analyzer_shared/lib/src/parser/class_member_parser.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class ClassMemberParser extends Parser {
4545
// This method is overridden for two reasons:
4646
// 1. Avoid generating events for arguments.
4747
// 2. Avoid calling skip expression for each argument (which doesn't work).
48-
Token parseArgumentsOpt(Token token) => skipArgumentsOpt(token);
48+
Token parseArgumentsOpt(Token token, {bool forPattern = false}) =>
49+
skipArgumentsOpt(token);
4950

5051
Token parseFunctionBody(Token token, bool isExpression, bool allowAbstract) {
5152
return skipFunctionBody(token, isExpression, allowAbstract);

pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class ForwardingListener implements Listener {
3535
listener?.beginBinaryExpression(token);
3636
}
3737

38+
@override
39+
void beginBinaryPattern(Token token) {
40+
listener?.beginBinaryPattern(token);
41+
}
42+
3843
@override
3944
void beginBlock(Token token, BlockKind blockKind) {
4045
listener?.beginBlock(token, blockKind);
@@ -522,6 +527,12 @@ class ForwardingListener implements Listener {
522527
listener?.endArguments(count, beginToken, endToken);
523528
}
524529

530+
@override
531+
void handleExtractorPatternFields(
532+
int count, Token beginToken, Token endToken) {
533+
listener?.handleExtractorPatternFields(count, beginToken, endToken);
534+
}
535+
525536
@override
526537
void endAssert(Token assertKeyword, Assert kind, Token leftParenthesis,
527538
Token? commaToken, Token semicolonToken) {
@@ -539,6 +550,11 @@ class ForwardingListener implements Listener {
539550
listener?.endBinaryExpression(token);
540551
}
541552

553+
@override
554+
void endBinaryPattern(Token token) {
555+
listener?.endBinaryPattern(token);
556+
}
557+
542558
@override
543559
void handleEndingBinaryExpression(Token token) {
544560
listener?.handleEndingBinaryExpression(token);
@@ -1254,6 +1270,11 @@ class ForwardingListener implements Listener {
12541270
listener?.handleAsOperator(operator);
12551271
}
12561272

1273+
@override
1274+
void handleCastPattern(Token operator) {
1275+
listener?.handleCastPattern(operator);
1276+
}
1277+
12571278
@override
12581279
void handleAssignmentExpression(Token token) {
12591280
listener?.handleAssignmentExpression(token);
@@ -1561,11 +1582,21 @@ class ForwardingListener implements Listener {
15611582
listener?.handleLiteralList(count, beginToken, constKeyword, endToken);
15621583
}
15631584

1585+
@override
1586+
void handleListPattern(int count, Token beginToken, Token endToken) {
1587+
listener?.handleListPattern(count, beginToken, endToken);
1588+
}
1589+
15641590
@override
15651591
void handleLiteralMapEntry(Token colon, Token endToken) {
15661592
listener?.handleLiteralMapEntry(colon, endToken);
15671593
}
15681594

1595+
@override
1596+
void handleMapPatternEntry(Token colon, Token endToken) {
1597+
listener?.handleMapPatternEntry(colon, endToken);
1598+
}
1599+
15691600
@override
15701601
void handleLiteralNull(Token token) {
15711602
listener?.handleLiteralNull(token);
@@ -1585,6 +1616,11 @@ class ForwardingListener implements Listener {
15851616
count, leftBrace, constKeyword, rightBrace, hasSetEntry);
15861617
}
15871618

1619+
@override
1620+
void handleMapPattern(int count, Token leftBrace, Token rightBrace) {
1621+
listener?.handleMapPattern(count, leftBrace, rightBrace);
1622+
}
1623+
15881624
@override
15891625
void handleMixinHeader(Token mixinKeyword) {
15901626
listener?.handleMixinHeader(mixinKeyword);
@@ -1600,6 +1636,11 @@ class ForwardingListener implements Listener {
16001636
listener?.handleNamedArgument(colon);
16011637
}
16021638

1639+
@override
1640+
void handlePatternField(Token? colon) {
1641+
listener?.handlePatternField(colon);
1642+
}
1643+
16031644
@override
16041645
void handleNamedRecordField(Token colon) {
16051646
listener?.handleNamedRecordField(colon);
@@ -1680,6 +1721,21 @@ class ForwardingListener implements Listener {
16801721
listener?.handleNonNullAssertExpression(bang);
16811722
}
16821723

1724+
@override
1725+
void handleNullAssertPattern(Token bang) {
1726+
listener?.handleNullAssertPattern(bang);
1727+
}
1728+
1729+
@override
1730+
void handleNullCheckPattern(Token question) {
1731+
listener?.handleNullCheckPattern(question);
1732+
}
1733+
1734+
@override
1735+
void handleVariablePattern(Token? keyword, Token variable) {
1736+
listener?.handleVariablePattern(keyword, variable);
1737+
}
1738+
16831739
@override
16841740
void handleNoType(Token lastConsumed) {
16851741
listener?.handleNoType(lastConsumed);
@@ -1716,8 +1772,8 @@ class ForwardingListener implements Listener {
17161772
}
17171773

17181774
@override
1719-
void handleParenthesizedCondition(Token token) {
1720-
listener?.handleParenthesizedCondition(token);
1775+
void handleParenthesizedCondition(Token token, Token? case_) {
1776+
listener?.handleParenthesizedCondition(token, case_);
17211777
}
17221778

17231779
@override
@@ -1730,11 +1786,32 @@ class ForwardingListener implements Listener {
17301786
listener?.endRecordLiteral(token, count, constKeyword);
17311787
}
17321788

1789+
@override
1790+
void handleRecordPattern(Token token, int count) {
1791+
listener?.handleRecordPattern(token, count);
1792+
}
1793+
17331794
@override
17341795
void endParenthesizedExpression(Token token) {
17351796
listener?.endParenthesizedExpression(token);
17361797
}
17371798

1799+
@override
1800+
void handleParenthesizedPattern(Token token) {
1801+
listener?.handleParenthesizedPattern(token);
1802+
}
1803+
1804+
@override
1805+
void handleConstantPattern(Token? constKeyword) {
1806+
listener?.handleConstantPattern(constKeyword);
1807+
}
1808+
1809+
@override
1810+
void handleExtractorPattern(
1811+
Token firstIdentifier, Token? dot, Token? secondIdentifier) {
1812+
listener?.handleExtractorPattern(firstIdentifier, dot, secondIdentifier);
1813+
}
1814+
17381815
@override
17391816
void handleQualified(Token period) {
17401817
listener?.handleQualified(period);
@@ -1839,6 +1916,11 @@ class ForwardingListener implements Listener {
18391916
listener?.handleUnaryPrefixExpression(token);
18401917
}
18411918

1919+
@override
1920+
void handleRelationalPattern(Token token) {
1921+
listener?.handleRelationalPattern(token);
1922+
}
1923+
18421924
@override
18431925
void handleUnescapeError(
18441926
Message message, Token location, int offset, int length) {

0 commit comments

Comments
 (0)