Created
November 28, 2016 20:32
-
-
Save chadaustin/b6901f11e7669dac9a01491fbd7498d0 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
var count: Int = 1234 | |
class C { | |
init() { | |
myThing = count | |
count += 1 | |
Swift.print("๐บ๐ธ Entry") | |
} | |
deinit { | |
C.theGlobal = self | |
Swift.print("๐บ๐ธ Exit") | |
} | |
let myThing: Int | |
static var theGlobal: C = C() | |
} | |
func main() { | |
{ | |
_ = C() | |
}() | |
Swift.print(C.theGlobal.myThing) | |
} | |
main() |
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
๐บ๐ธ Entry | |
๐บ๐ธ Entry | |
๐บ๐ธ Exit | |
๐บ๐ธ Exit | |
139638667215401 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment