Skip to content
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

Compile error on latest version of Nim #79

Open
ghost opened this issue Dec 12, 2019 · 0 comments
Open

Compile error on latest version of Nim #79

ghost opened this issue Dec 12, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2019

Describe the bug
I get error the following when compiling a nim file containing identical code to the first example given in the README:

/home/<me>/kohn/kohn.nim(27, 22) Error: type mismatch: got <MongoBase>
but expected one of: 
proc connect(socket: AsyncFD; address: string; port: Port; domain = Domain.AF_INET): owned(
    Future[void])
  first type mismatch at position: 1
  required type for socket: AsyncFD
  but expression 'm' is of type: MongoBase
proc connect(am: AsyncMongo): Future[bool]
  first type mismatch at position: 1
  required type for am: AsyncMongo
  but expression 'm' is of type: MongoBase
proc connect(m: Mongo): bool
  first type mismatch at position: 1
  required type for m: Mongo
  but expression 'm' is of type: MongoBase

expression: connect(m)

To Reproduce

  1. Ensure that you are using Nim 1.0.2
  2. Compile the example code given (substitute in collections)

Expected behavior
It should compile without error.

Desktop:

  • OS: Manjaro Linux
  • Version 1.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants