Skip to content

Instantly share code, notes, and snippets.

@jspahrsummers
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jspahrsummers/a0fb1abbb71f598d712f to your computer and use it in GitHub Desktop.
Save jspahrsummers/a0fb1abbb71f598d712f to your computer and use it in GitHub Desktop.
Workaround for “unimplemented IR generation feature non-fixed class layout”
class ObjectWrapper<T> {
let backingVar: T[]
var value: T {
get {
return backingVar[0]
}
set(newValue) {
backingVar[0] = newValue
}
}
init(_ value: T) {
self.backingVar = [value]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment