mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
26 lines
500 B
Nim
26 lines
500 B
Nim
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)
|