This fixes PR30566.
The assertion is triggered when RecordLayoutBuilder tries to compute the size of a field (for capture "name" in the test case) whose type hasn't been deduced. This fixes the bug by correcting the typo of the capture initializer after the initializer is parsed and before setting the expression for the annotation token.
rdar://problem/23380132
What happens when there is no typo correction to apply?