swift
6c3ad104 - [Statement checker] Always wire up case vars with bindSwitchCasePatternVars

Commit
5 years ago
[Statement checker] Always wire up case vars with bindSwitchCasePatternVars bindSwitchCasePatternVars() was introduced as a simpler way to wire up the "parent" links for case variables with same-named case variables from the previous case item, and is used in the function builders code to handle switch statements. It duplicated some logic from the statement checker that did the same thing using a more complicated algorithm. Switch (ha ha) the logic in the statement checker over to using bindSwitchCasePatternVars(), fixing a bug involving unresolved patterns along the way, and remove the old code that incrementally wired up the parent links. The resulting code is simpler and is unified across the various code paths.
Author
Committer
Parents
Loading