ios - Swift 2.0 Defer Not working in XCode 7.0.1? -


i have simple block of code defer block, playground not executing defer block. doing wrong?

the following gets printed: "step 1" "step 3" "step 4" "step 5"

import uikit  print("step 1")  {     defer { print("step 2") }     print("step 3")     print("step 4") }   print("step 5") 

are sure looking @ console? if so, there must bug in playground. here got code:
http://i.stack.imgur.com/en6kn.png


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -