1. takeru@github

    Posted

    takeru@github
Changes in title
+Swift PlaygroundでExecution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
Changes in tags
Changes in body
Source | HTML | Preview
@@ -0,0 +1,60 @@
+OK
+==
+
+```swift
+// Playground - noun: a place where people can play
+
+if true {
+ var a1:String? = nil
+ a1 = "sss"
+ if let a2 = a1 {
+ println("xxx")
+ }
+ else{
+ println("yyy")
+ }
+ var b:String = a1!
+}
+```
+
+
+NG
+==
+
+```swift
+// Playground - noun: a place where people can play
+
+if true {
+ var a1:String? = nil
+ // a1 = "sss" // !!!
+ if let a2 = a1 { // (!) Playground execution aborted: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
+ println("xxx")
+ }
+ else{
+ println("yyy")
+ }
+ var b:String = a1!
+}
+```
+
+
+OK
+==
+
+```swift
+// Playground - noun: a place where people can play
+
+if true {
+ var a1:String? = nil
+ // a1 = "sss" // !!!
+ if let a2 = a1 {
+ println("xxx")
+ }
+ else{
+ println("yyy")
+ }
+ // var b:String = a1! // !!!
+}
+```
+
+なぜなのか