title: Swift compiler error while conforming to protocol by providing property via getter function
body: <p>I have a class that is attempting to conform to the <code>NSFilePresenter</code> protocol. As best I can tell, there are only two requirements, and they're both properties:</p>
  
  <pre><code>var presentedItemURL: NSURL! { get }
  var presentedItemOperationQueue: NSOperationQueue! { get }
  </code></pre>
  
  <p>Because I'm migrating my existing Objective-C project to Swift, I already have one of these maintained as an ivar that I'd like to maintain:</p>
  
  <pre><code>var _trackingURL: NSURL! = ...
  
  var presentedItemURL: NSURL! {
      return _trackingURL
  }
  
  var presentedItemOperationQueue: NSOperationQueue! {
      return NSOperationQueue.mainQueue()
  }
  </code></pre>
  
  <p>However, this build fails due to a 'Swift Compiler Error' in Xcode, but does not specify what I'm doing wrong. I have a stack trace from the compiler, but I can't decipher what the root issue is:</p>
  
  <pre><code>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&lt;(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void&gt;::visit(swift::Decl*) + 125
  6  swift                    0x000000010a74abcb (anonymous namespace)::ObjCPrinter::printMembers(swift::IteratorRange&lt;swift::DeclIterator&gt;) + 251
  7  swift                    0x000000010a747603 swift::ASTVisitor&lt;(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void&gt;::visit(swift::Decl*) + 1795
  8  swift                    0x000000010a74638e swift::printAsObjC(llvm::raw_ostream&amp;, swift::Module*) + 1934
  9  swift                    0x000000010a4d0b6e printAsObjC(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;, swift::Module*) + 286
  10 swift                    0x000000010a4d0178 frontend_main(llvm::ArrayRef&lt;char const*&gt;, char const*, void*) + 3592
  11 swift                    0x000000010a4cf35d main + 1533
  12 libdyld.dylib            0x00007fff978e45c9 start + 1
  
  ...
  
  &lt;unknown&gt;:0: error: unable to execute command: Segmentation fault: 11
  &lt;unknown&gt;:0: error: merge-module command failed due to signal (use -v to see invocation)
  </code></pre>
  
  <p>While it would be nice if the compiler were able to survive whatever I've done to it, I'd rather just remedy the issue in my code, whatever it is.</p>