Commit dc13a2f
authored
Don't crash on a doc comment before a pattern variable statement. (#1589)
This is a funny corner of the analyzer AST API where a
PatternVariableDeclarationStatement wraps an inner
PatternVariableDeclaration. The statement class isn't itself an
AnnotatedNode so doesn't get caught by the first couple of cases. But
its beginToken comes from the inner PatternVariableDeclaration, which
*is* an AnnotatedNode, so we need to recurse into that.
Fix #1586.1 parent 0f448ba commit dc13a2f
File tree
2 files changed
+18
-0
lines changed- lib/src
- test/tall/regression/1500
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments