fixes yet another LL regression (Aporia compiles again)
This commit is contained in:
parent
bd933e6009
commit
2309975f78
2 changed files with 23 additions and 1 deletions
22
tests/closure/texplicit_dummy_closure.nim
Normal file
22
tests/closure/texplicit_dummy_closure.nim
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue