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

type mismatch only for JS target #4802

Closed
flyx opened this issue Sep 19, 2016 · 1 comment
Closed

type mismatch only for JS target #4802

flyx opened this issue Sep 19, 2016 · 1 comment

Comments

@flyx
Copy link
Contributor

flyx commented Sep 19, 2016

This is an error I get when trying to compile NimYAML to JS. It works with the C backend, which is strange, because it should not be backend-specific. To reproduce:

git clone https://github.com/flyx/NimYAML.git && cd NimYAML
git checkout 2f3a8097387a80c4e9bebbb3f3e21676610e873c
nim js test/tests

Output:

/Users/flyx/Projects/NimYAML/private/lex.nim(1144, 7)
    template/generic instantiation from here
/Users/flyx/Projects/NimYAML/private/lex.nim(1118, 29)
    template/generic instantiation from here
/Users/flyx/Projects/NimYAML/private/lex.nim(480, 31)
    template/generic instantiation from here
/Users/flyx/Projects/NimYAML/private/lex.nim(701, 44)
    template/generic instantiation from here
/Users/flyx/Projects/NimYAML/private/lex.nim(802, 35)
    Error: type mismatch: got (proc (lex: YamlLexer): bool{.gcsafe, locks: 0.})
    but expected 'LexerState = proc (lex: YamlLexer): bool{.closure, gcsafe, locks: 0.}'

This work with nim c test/tests.

@flyx
Copy link
Contributor Author

flyx commented Feb 12, 2017

This has been a mismatch in raises declarations.

@flyx flyx closed this as completed Feb 12, 2017
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

1 participant