Last active
December 2, 2015 00:15
-
-
Save tjw/27e2c5febeca7231709b to your computer and use it in GitHub Desktop.
Swift generics link error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// xcrun swift generic-link-error.swift | |
// produces: | |
// LLVM ERROR: Program used external function '_OBJC_METACLASS_$__TtC4main1A' which could not be resolved! | |
import Cocoa | |
class A<X> : NSObject { | |
override class func keyPathsForValuesAffectingValueForKey(key: String) -> Set<String> { | |
return super.keyPathsForValuesAffectingValueForKey(key) | |
} | |
} | |
class B : A<Int> {} | |
let b = B() | |
print("b = \(b)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment