New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using Selectors, Error: undeclared field: 'OSErrorCode' #7667

Closed
2vg opened this Issue Apr 21, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@2vg
Copy link
Contributor

2vg commented Apr 21, 2018

import selectors

type
  Data = object
    a: string

var s = newSelector[Data]()

while true:
  var ready = s.select(-1)
prog.nim(10, 16) template/generic instantiation from here
lib/pure/ioselects/ioselectors_epoll.nim(478, 25) template/generic instantiation from here
lib/pure/ioselects/ioselectors_epoll.nim(389, 38) Error: undeclared field: 'OSErrorCode'

see result: https://wandbox.org/permlink/HBffIEUCzjkPaHpV

@Yardanico

This comment has been minimized.

Copy link
Collaborator

Yardanico commented Apr 21, 2018

Can you try to import os module?

@dom96 dom96 added the Stdlib label Apr 21, 2018

@dom96

This comment has been minimized.

Copy link
Member

dom96 commented Apr 21, 2018

If selectors are importing os then this is a Nim bug. Otherwise it's just a case of adding that import.

@dom96

This comment has been minimized.

Copy link
Member

dom96 commented Oct 27, 2018

@Araq any ideas? I can see that selectors imports os.

@Araq Araq closed this in e44df5d Oct 29, 2018

ianmcxa added a commit to ianmcxa/Nim that referenced this issue Oct 30, 2018

fixes nim-lang#7667; underlying issue is that dot calls in generics h…
…ave no concept of 'friend' symbols, will be addressed later

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 2018

fixes nim-lang#7667; underlying issue is that dot calls in generics h…
…ave no concept of 'friend' symbols, will be addressed later

narimiran added a commit to narimiran/Nim that referenced this issue Nov 1, 2018

fixes nim-lang#7667; underlying issue is that dot calls in generics h…
…ave no concept of 'friend' symbols, will be addressed later

narimiran added a commit that referenced this issue Nov 1, 2018

fixes #7667; underlying issue is that dot calls in generics have no c…
…oncept of 'friend' symbols, will be addressed later

narimiran added a commit that referenced this issue Nov 1, 2018

fixes #7667; underlying issue is that dot calls in generics have no c…
…oncept of 'friend' symbols, will be addressed later

(cherry picked from commit e44df5d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment