Open dabrahams opened 7 years ago
Here is a much simpler reproducer that almost certainly also reproduces with a standard build:
import StdlibUnittest
func f() {
_ = "foo".utf16.lazy.map { $0 }
}
Probably StdlibUnittest imports Foundation, and that's what causes the problem. @belkadan Doesn't this reveal a fundamental issue with our model for conformance visibility?
We've had this bug/feature for a long time, and the current intent is that we'd link against Foundation. I thought we fixed that a long time ago.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 111d82246fad6b4743a2b0ee3dde9b80Issue Description:
Build the compiler and run the Prototypes/AnyUnicode.swift test. I get:
Why it should be complaining about something in Foundation… well, it probably has to do with the fact that
String
'sUTF16View
only conforms toRandomAccessCollection
if youimport Foundation
. But the compiler shouldn't have knowledge of that conformance without Foundation imported, right?!Other hashes