Created
April 24, 2017 05:24
-
-
Save morishin/23e1a45824e0ae7f85cdafaa48e187f8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
struct Hoge { | |
static var staticVar = Date() | |
static var staticComputedVar: Date { return Date() } | |
static let staticLet = Date() | |
static let staticLet2 = { return Date() }() | |
} | |
Hoge.staticVar == Hoge.staticVar // true | |
Hoge.staticComputedVar == Hoge.staticComputedVar // false | |
Hoge.staticLet == Hoge.staticLet // true | |
Hoge.staticLet2 == Hoge.staticLet2 // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment