diff options
Diffstat (limited to 'tests/closure/texplicit_dummy_closure.nim')
-rw-r--r-- | tests/closure/texplicit_dummy_closure.nim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/closure/texplicit_dummy_closure.nim b/tests/closure/texplicit_dummy_closure.nim new file mode 100644 index 000000000..02b9ac7c7 --- /dev/null +++ b/tests/closure/texplicit_dummy_closure.nim @@ -0,0 +1,25 @@ +discard """ + disabled: true +""" + +# This is a regression of the new lambda lifting; detected by Aporia +import asyncio, sockets +import os + +type + Window = object + oneInstSock*: AsyncSocket + IODispatcher*: Dispatcher + +var + win: Window + +proc initSocket() = + win.oneInstSock = asyncSocket() + #win.oneInstSock.handleAccept = + proc test(s: AsyncSocket) = + var client: AsyncSocket + proc dummy(c: AsyncSocket) {.closure.} = + discard + client.handleRead = dummy + test(win.oneInstSock) |