khchen / wNim

Nim's Windows GUI Framework
MIT License
326 stars 17 forks source link

Example compile error with nim 2.2.0 #125

Open leeooox opened 1 month ago

leeooox commented 1 month ago

Hi,

I am using the Nim 2.2.0 to compile examples

nim -v
Nim Compiler Version 2.2.0 [Windows: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf

The errors is below:

nim c helloworld.nim

Hint: used config file 'C:\Work\software\nim-2.2.0\config\nim.cfg' [Conf]
Hint: used config file 'C:\Work\software\nim-2.2.0\config\config.nims' [Conf]
Hint: used config file 'C:\Work\prog\nim\wNim\examples\config.nims' [Conf]
.....................................................................................................................................................................................................................................................................
C:\Work\prog\nim\wNim\wNim\private\wResizer.nim(171, 7) template/generic instantiation of `wClass` from here
C:\Work\prog\nim\wNim\wNim\private\wResizer.nim(178, 44) template/generic instantiation of `initHashSet` from here
C:\Work\software\nim-2.2.0\lib\pure\collections\sets.nim(133, 19) template/generic instantiation of `default` from here
C:\Work\software\nim-2.2.0\lib\system.nim(900, 17) Error: invalid type: 'None' in this context: 'proc (_: typedesc[HashSet[None]]): HashSet[None]{.noSideEffect, gcsafe.}' for proc

I am running it on Win11 64bit.

Would you please have a check thanks?

leeooox commented 1 month ago

After comment line 178 of wResizer.nim, the examples compile and run successfully. Again, it seems also an issue in previous version, but it comes out again in nim 2.2.0 https://github.com/khchen/wNim/pull/120

image