Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import Foundation
  2.  
  3. struct Hoge {
  4. static var staticVar = Date()
  5. static var staticComputedVar: Date { return Date() }
  6. static let staticLet = Date()
  7. static let staticLet2 = { return Date() }()
  8. }
  9.  
  10. Hoge.staticVar == Hoge.staticVar // true
  11. Hoge.staticComputedVar == Hoge.staticComputedVar // false
  12. Hoge.staticLet == Hoge.staticLet // true
  13. Hoge.staticLet2 == Hoge.staticLet2 // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement