Swift compiler error when conforming to NSFilePresenter

Originator:craigotis
Number:rdar://17186304 Date Originated:05-Jun-2014 06:14 PM
Status:Open Resolved:
Product:Developer Tools (Xcode) Product Version:Version 6.0 (6A215l)
Classification: Reproducible:Always
 
By attempting to implement the NSFilePresenter protocol, I encounter a compiler error in Swift. You can view more details here:

http://stackoverflow.com/questions/24070672/swift-compiler-error-while-conforming-to-protocol-by-providing-property-via-gett

The stack trace is:

0  swift                    0x000000010b10b608 llvm::sys::PrintStackTrace(__sFILE*) + 40
1  swift                    0x000000010b10baf4 SignalHandler(int) + 452
2  libsystem_platform.dylib 0x00007fff92578f1a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fd0c225e968 _sigtramp + 802052712
4  swift                    0x000000010a74797a (anonymous namespace)::ObjCPrinter::visitVarDecl(swift::VarDecl*) + 762
5  swift                    0x000000010a746f7d swift::ASTVisitor<(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void>::visit(swift::Decl*) + 125
6  swift                    0x000000010a74abcb (anonymous namespace)::ObjCPrinter::printMembers(swift::IteratorRange<swift::DeclIterator>) + 251
7  swift                    0x000000010a747603 swift::ASTVisitor<(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void>::visit(swift::Decl*) + 1795
8  swift                    0x000000010a74638e swift::printAsObjC(llvm::raw_ostream&, swift::Module*) + 1934
9  swift                    0x000000010a4d0b6e printAsObjC(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, swift::Module*) + 286
10 swift                    0x000000010a4d0178 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 3592
11 swift                    0x000000010a4cf35d main + 1533
12 libdyld.dylib            0x00007fff978e45c9 start + 1

Steps to Reproduce:
Occurs by simply adding this to any class, after adding NSFilePresenter to the list of conformed protocols.

var _trackingURL: NSURL! = ...

var presentedItemURL: NSURL! {
    return _trackingURL
}

var presentedItemOperationQueue: NSOperationQueue! {
    return NSOperationQueue.mainQueue()
}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!