Can you create a quick tarball of the swiftpm project. Would expedite the
answering of the question.
> On Dec 30, 2016, at 11:17 AM, Yang Yang via swift-users
> I try to wrap a c library in swift package named Test.
> The code looks like this:
So as the *foo(_ x:A) *function is generic, when we call *foo(x) *compiler
needs to determine what type is *A *to be able to create concrete function.
But x defined as *let x = X() as P *so we only know about it that it
conforms to *P *but not its real type to put instead of *A*. Right?
> On 30 Dec 2016, at 12:14, Mikhail Seriukov via swift-users
> But I think I still do not get it.
> What does really happen when we write this?
>> let x = X() as P
'X()' creates a value.
'as P’ constrains the value such that the only things we know
But I think I still do not get it.
What does really happen when we write this?
let x = X() as P
As I said, I expect x to be Any after that. If it is, then it should be
But if it is not then what is the actual type of x?
So the real question is how the type checker works here?