diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-01-18 03:00:14 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-01-18 03:00:14 +0100 |
commit | 2309975f782bf59b240e3874d5c31b4b299eca5d (patch) | |
tree | 76392a3f5b4ae005e169b60511a14fa6a61c8da3 /tests/closure | |
parent | bd933e6009b01768bfc62f4386aea9a09282beb6 (diff) | |
download | Nim-2309975f782bf59b240e3874d5c31b4b299eca5d.tar.gz |
fixes yet another LL regression (Aporia compiles again)
Diffstat (limited to 'tests/closure')
-rw-r--r-- | tests/closure/texplicit_dummy_closure.nim | 22 |
1 files changed, 22 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..ec608b31a --- /dev/null +++ b/tests/closure/texplicit_dummy_closure.nim @@ -0,0 +1,22 @@ + +# This is a regression of the new lambda lifting; detected by Aporia +import asyncio, sockets +import os + +type + Window = object + oneInstSock*: PAsyncSocket + IODispatcher*: PDispatcher + +var + win: Window + +proc initSocket() = + win.oneInstSock = asyncSocket() + #win.oneInstSock.handleAccept = + proc test(s: PAsyncSocket) = + var client: PAsyncSocket + proc dummy(c: PAsyncSocket) {.closure.} = + discard + client.handleRead = dummy + test(win.oneInstSock) |