title: Compiler error for nested class with override func - Swift Xcode6
body: <p>I have a simple Cocoa Touch Framework project with Swift code only. In my unit test class I want to do mocking so I created a mock class which inherits from the type I want to mock:</p>
  
  <pre><code>func testFirstClassMocking() {
      class MockSecondClass: SecondClass {
          var mockedResult = "My mocked value"
          override func printSecondLogEntry(logEntry: String) -&gt; String {
  
              return mockedResult
          }
      }
  
      let mock = MockSecondClass()
  
      var firstClass = FirstClass(secondClass: mock)
  
      let result = firstClass.printFirstLogEntry("whatever")
  
      XCTAssertEqual("My mocked value", result);
  }
  </code></pre>
  
  <p>This result in a generic compiler error:</p>
  
  <pre><code>Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
  </code></pre>
  
  <p>Now, when I take the nested class out of the function and nest just in my testing class - everything is great. Code compiles and my unit test runs great. Is class nesting in functions not allowed any more?</p>
  
  <p>My Xcode ver: Version 6.0.1 (6A317)</p>
  
  <p>EDIT: one other thing - if I remove the override of the func - the compiler has no issues. Obviously I need the override func to be able to return a value I need in my unit test when my mock object runs.</p>