swift
218f4905 - [IDE] Fix SyntaxModel crash due to out-of-order walking of EnumElementDecls

Commit
6 years ago
[IDE] Fix SyntaxModel crash due to out-of-order walking of EnumElementDecls ModelASTWalker was previously constructing SyntaxNodes for EnumElementDecls manually when visiting their associated EnumCaseDecl so that they would appear as children rather than siblings. It wasn't actually walking these nodes though, so missed handling some things, e.g. closures passed as default argument values. These were also still being visited later, and because the first visit consumed all the associated TokenNodes, this was triggering an assertion due to the associated TokenNodes not matching expectations.
Author
Nathan Hawes
Committer
Nathan Hawes
Parents
Loading