Re: [swift-users] Details of defer statement in Swift

2016-11-10 Thread Chris Lattner via swift-users
> On Nov 9, 2016, at 11:45 PM, Rien wrote: > > The manual says this: > > https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html > >

Re: [swift-users] Get class of object in Swift 2.3

2016-11-10 Thread Nate Birkholz via swift-users
Never mind, .dynamicType works, it just doesn't autocomplete any more. /facepalm On Thu, Nov 10, 2016 at 11:54 AM, Nate Birkholz wrote: > self.dynamicType doesn't work any more, but type(of: self) is just Swift > 3.0 So how do i get the class? > > Use case in a unit test: >

Re: [swift-users] lldb not working when C module includes a header outside of it's /include dir

2016-11-10 Thread Jim Ingham via swift-users
Could you put the working example in the bug as well? Jim > On Nov 10, 2016, at 11:39 AM, Andrey Fidrya via swift-users > wrote: > > Hi All, > > Update: I've found that debugging works if C module is in a separate > repository. So, this problem is only present if

[swift-users] Get class of object in Swift 2.3

2016-11-10 Thread Nate Birkholz via swift-users
self.dynamicType doesn't work any more, but type(of: self) is just Swift 3.0 So how do i get the class? Use case in a unit test: let bundle = NSBundle(forClass: type(of: self)) -- Nate Birkholz ___ swift-users mailing list swift-users@swift.org

Re: [swift-users] lldb not working when C module includes a header outside of it's /include dir

2016-11-10 Thread Andrey Fidrya via swift-users
Hi All, Update: I've found that debugging works if C module is in a separate repository. So, this problem is only present if there are two modules in Sources/ dir of the same repo. It doesn't matter if headers are located in /usr/local/include or in other location. Andrey > On 09 Nov 2016,

Re: [swift-users] How to include swift test resource files?

2016-11-10 Thread Daniel Dunbar via swift-users
We do not yet have any kind of story for resources. If you just need data during tests, what you can do is just rely on the tests being run in an environment which has access to the source, so you can use Swift's `#file` to derive the location of your test artifacts from the current source

[swift-users] How to include swift test resource files?

2016-11-10 Thread Edward Connell via swift-users
Swift test builds and runs the package Tests. My tests require data files such as images to run. With an Xcode project we can Copy Bundle Resources in the Build Phases to include the necessary files. How do we do this with swift test, or swift build? I thought about a hack to manually copy the

[swift-users] Shared Swift state for XX has developed fatal errors and is being discarded.

2016-11-10 Thread dev dev via swift-users
When use debug I find this error , how to fix it *Shared Swift state for XX has developed fatal errors and is being discarded.* *REPL definitions and persistent names/types will be lost.* *Printing description of d.data._wrapped:* *expression produced error: error: in auto-import:* *failed to