Commit 922d809
committed
Don't crash on a doc comment before a pattern variable statement.
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 89577e7 commit 922d809
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