mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
I tried doing this directly from typeCheckDecl(), but it breaks associated type inference. We can figure this out later when declaration checking becomes lazier and more incremental. Note that typo correction does not force witnesses of synthesized conformances. This means that a typo correction from a top-level form will no longer pick up synthesized witnesses, and will find the protocol requirement instead. To give a test the same behavior as before, I put the expression in a function body instead of a top-level form. Note that we already had the same behavior with typo correction from pattern binding initializers and other contexts that are type checked before conformances.