khchen / wNim

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

Error: ambiguous identifier: 'wResizable' #78

Closed retsyo closed 3 years ago

retsyo commented 3 years ago

I am using latest installed wNim and winim on latest built nim. When I try to compile the demo.nim, I get

$ nim c -r demo.nim
Hint: used config file 'E:\msys64\home\USER\_nim\nim\config\nim.cfg' [Conf]
Hint: used config file 'E:\msys64\home\USER\_nim\nim\config\config.nims' [Conf]
.........................................................................................
C:\Users\USER\.nimble\pkgs\wnim-0.11.5\wNim\private\wResizer.nim(109, 7) template/generic instantiation of `wClass` from here
C:\Users\USER\.nimble\pkgs\wnim-0.11.5\wNim\private\wResizer.nim(116, 33) Error: ambiguous identifier: 'wResizable' -- use one of the following:
  wTypes.wResizable: wResizable
  wnim.wResizable:

which can be fixed by changing

    self.mObjects = initHashSet[wResizable]()

to

    self.mObjects = initHashSet[wBase.wResizable]()
khchen commented 3 years ago

What version of compiler do you use? I cannot reproduce the error.

retsyo commented 3 years ago

latest cloned&built nim

$ nim
Nim Compiler Version 1.5.1 [Windows: amd64]
Compiled at 2021-01-06
Copyright (c) 2006-2020 by Andreas Rumpf

and latest nimble install wnim( of cause, the old one has been uninstalled)