diff options
author | Araq <rumpf_a@web.de> | 2018-12-21 17:16:14 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-21 22:03:41 +0100 |
commit | 4a6d699bc5651e834622ea8653d6a1a03ac75bd2 (patch) | |
tree | 5bac4a1e9596491e9567625987be3d72ee3a6699 | |
parent | da809925773c112f5b26add9e86e9f4837342372 (diff) | |
download | Nim-4a6d699bc5651e834622ea8653d6a1a03ac75bd2.tar.gz |
C++: make async tests green on Windows
-rw-r--r-- | compiler/sigmatch.nim | 10 | ||||
-rw-r--r-- | lib/windows/winlean.nim | 2 | ||||
-rw-r--r-- | tests/async/tasynctry.nim | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index d66e8d121..0915f303b 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -2231,14 +2231,14 @@ proc matchesAux(c: PContext, n, nOrig: PNode, else: m.state = csNoMatch return - + if formal.typ.kind == tyVar: - let arg_converter = if arg.kind == nkHiddenDeref: arg[0] else: arg - if arg_converter.kind == nkHiddenCallConv: - if arg_converter.typ.kind != tyVar: + let argConverter = if arg.kind == nkHiddenDeref: arg[0] else: arg + if argConverter.kind == nkHiddenCallConv: + if argConverter.typ.kind != tyVar: m.state = csNoMatch m.mutabilityProblem = uint8(f-1) - return + return elif not n.isLValue: m.state = csNoMatch m.mutabilityProblem = uint8(f-1) diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 3e37b824c..1be982767 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -516,7 +516,7 @@ type fd_count*: cint # unsigned fd_array*: array[0..FD_SETSIZE-1, SocketHandle] - Timeval* = object + Timeval* {.importc: "timeval", header: "<time.h>".} = object tv_sec*, tv_usec*: int32 AddrInfo* = object diff --git a/tests/async/tasynctry.nim b/tests/async/tasynctry.nim index b13c57951..a7cb5223d 100644 --- a/tests/async/tasynctry.nim +++ b/tests/async/tasynctry.nim @@ -6,6 +6,7 @@ Multiple idents in except Multiple except branches Multiple except branches 2 ''' +targets: "c" """ import asyncdispatch, strutils |