Re: [swift-users] Weird protocol behaviour.

2016-12-22 Thread Kevin Nattinger via swift-users
I recall seeing a request on the -evolution list for something like `T := X` to indicate it could be X itself or anything inheriting / implementing it, so it’s certainly known behavior, if not desired. IMO it’s a bug and `:` should be fixed to include the root type, whether or not that requires

[swift-users] How do I use Xcode for a C library wrapped in Swift

2016-12-22 Thread Dave Yost via swift-users
I just posted this on StackOverflow . Insights most welcome. I'm trying to create an Xcode workspace that contains projects that make: A bird dynamic library built from C source A Cbird Swift

[swift-users] Possible bug in Swift REPL autocompletion?

2016-12-22 Thread Eugenio Baglieri via swift-users
Good evening, i was playing with swift REPL. I imported Darwin and using c functions. I noted that autocompletion is unusable if the last character is a parenthesis “(“. The autocompletion seems to not get account of the already written function name, and after parenthesis shows as possible

Re: [swift-users] Weird protocol behaviour.

2016-12-22 Thread Howard Lovatt via swift-users
The following variation works: protocol P {} class P1:P {} class X:P1 {} func foo(_ x:A) {} func bar() { //let x = X() // this compiles let x = X() as P1 // this does not compile. Why? foo(x) } Which adds credence to the bug theory. Note two changes: 1. two levels of

Re: [swift-users] Weird protocol behaviour.

2016-12-22 Thread Guillaume Lessard via swift-users
The function foo(x: A){} requires a type which conforms to protocol P. An existential of protocol P does not actually conform to protocol P. It’s always been a limitation in Swift: If the function’s signature were foo(x: P){}, it would work. Howard’s example

Re: [swift-users] Bls: Bls: module (de)-initialization

2016-12-22 Thread Glenn L. Austin via swift-users
> On Dec 21, 2016, at 7:29 PM, Mr Bee via swift-users > wrote: > > Sorry for not being clear. My english isn't very good either. > > What I meant was static module linking (loading and unloading) for Swift > modules. Also with initialization and deinitialization for