File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed
test/tall/regression/1600 Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 66* Ensure comment formatting is idempotent (#1606 ).
77* Better indentation of leading comments on property accesses in binary operator
88 operands (#1611 ).
9+ * Don't crash on doc comments in local variable declarations (#1621 ).
910
1011## 3.0.0
1112
Original file line number Diff line number Diff line change @@ -31,14 +31,18 @@ extension AstNodeExtensions on AstNode {
3131 AnnotatedNode (metadata: [var annotation, ...]) => annotation.beginToken,
3232 AnnotatedNode (firstTokenAfterCommentAndMetadata: var token) => token,
3333
34- // DefaultFormalParameter is not an AnnotatedNode, but its first child
35- // (parameter) *is* an AnnotatedNode, so we can't just use beginToken.
34+ // The inner [NormalFormalParameter] is an [AnnotatedNode].
3635 DefaultFormalParameter (: var parameter) => parameter.firstNonCommentToken,
3736
38- // A pattern variable statement isn't itself an AnnotatedNode, but the
39- // [PatternVariableDeclaration] that it wraps is.
37+ // The inner [PatternVariableDeclaration] is an [AnnotatedNode].
4038 PatternVariableDeclarationStatement (: var declaration) =>
4139 declaration.firstNonCommentToken,
40+
41+ // The inner [VariableDeclarationList] is an [AnnotatedNode].
42+ VariableDeclarationStatement (: var variables) =>
43+ variables.firstNonCommentToken,
44+
45+ // Otherwise, we don't have to worry about doc comments.
4246 _ => beginToken
4347 };
4448 }
Original file line number Diff line number Diff line change 1+ >>>
2+ /*member: readLocalInAnonymousClosure:*/
3+ readLocalInAnonymousClosure(/**/ parameter) {
4+ var /**/ local = parameter;
5+ return /*fields=[local],free=[local]*/ () => local;
6+ }
7+ <<<
8+ /*member: readLocalInAnonymousClosure:*/
9+ readLocalInAnonymousClosure(/**/ parameter) {
10+ var /**/ local = parameter;
11+ return /*fields=[local],free=[local]*/ () => local;
12+ }
13+ >>>
14+ class C {
15+ @override
16+ // ignore: overridden_fields
17+ final FunctionEntity _member;
18+ }
19+ <<<
20+ class C {
21+ @override
22+ // ignore: overridden_fields
23+ final FunctionEntity _member;
24+ }
You can’t perform that action at this time.
0 commit comments