Skip to content

Instantly share code, notes, and snippets.

@SteveTrewick
Created June 19, 2014 12:48
Show Gist options
  • Save SteveTrewick/fbf4f3a7139562b82b2e to your computer and use it in GitHub Desktop.
Save SteveTrewick/fbf4f3a7139562b82b2e to your computer and use it in GitHub Desktop.
Workaround for LLVM error when using generic class type parameters in Swift
class ListNode<T> {
var items:T[] = []
var item: T { get { return items[0] } set { items = [newValue] }}
var nextNode:ListNode?
init( item i:T ) { item = i}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment