Commits
Jordan Rose committed 1d85cc7e0b7
Check user-written functions before looking at any imported types. User-written functions can trigger the use of delayed protocols on imported types. In the case of enums and structs, it's possible that we need to synthesize a conformance for one of these protocols. We were failing to do so because we were checking imported types before looking at any user code, and deciding not to bother with the delayed protocols because no one had referenced them yet. This isn't necessarily a good long-term solution because it doesn't handle implicitly-defined functions triggering the use of implicit conformances on imported types. The general problem of "this enum was never compared so I never made an Equatable performance" is still there, just much less likely (since our synthesized declarations are usually quite simple). We may want to revisit this later to make it more robust. I also couldn't find a reduced test case that triggered this issue. The reported code looks very similar to the test case I added, but the one I added doesn't actually fail before this commit. I'm including it anyway to guard against regressions. rdar://problem/18198880 Swift SVN r21840