summary refs log tree commit diff stats
path: root/tests/closure/tclosure.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2022-12-06 11:44:26 +0300
committerGitHub <noreply@github.com>2022-12-06 09:44:26 +0100
commit6d8cf25bd7d9d0836c7c894cffae2cdb4f6a2503 (patch)
treee47cdd7a93bc2ee7b67376bb5bee911322fb639a /tests/closure/tclosure.nim
parent739e1badb6e48741e28420739769d3714ac6ceda (diff)
downloadNim-6d8cf25bd7d9d0836c7c894cffae2cdb4f6a2503.tar.gz
deprecate `do:` meaning `do ():` + misc cleanup (#20927)
* test disable do: block lambda lifting

* fix last test [skip ci]

* deprecate `do:` meaning `do ():` + misc cleanup

closes https://github.com/nim-lang/RFCs/issues/486

* oops

* fix

* no idea what could be causing nimsuggest failure other than this

* ensure ci works
Diffstat (limited to 'tests/closure/tclosure.nim')
-rw-r--r--tests/closure/tclosure.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/closure/tclosure.nim b/tests/closure/tclosure.nim
index 1bbe4cd0d..fa1f79ffe 100644
--- a/tests/closure/tclosure.nim
+++ b/tests/closure/tclosure.nim
@@ -239,19 +239,19 @@ block doNotation:
   b.onClick do (e: Event):
     echo "click at ", e.x, ",", e.y
 
-  b.onFocusLost:
+  b.onFocusLost do ():
     echo "lost focus 1"
 
-  b.onFocusLost do:
+  b.onFocusLost do ():
     echo "lost focus 2"
 
-  b.onUserEvent("UserEvent 1") do:
+  b.onUserEvent("UserEvent 1") do ():
     discard
 
-  b.onUserEvent "UserEvent 2":
+  onUserEvent(b, "UserEvent 2") do ():
     discard
 
-  b.onUserEvent("UserEvent 3"):
+  b.onUserEvent("UserEvent 3") do ():
     discard
 
   b.onUserEvent("UserEvent 4", () => echo "event 4")