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 missing from Problems list #198

Open
zacaj opened this issue Aug 10, 2022 · 2 comments
Open

Compile error missing from Problems list #198

zacaj opened this issue Aug 10, 2022 · 2 comments

Comments

@zacaj
Copy link

zacaj commented Aug 10, 2022

I made a single nim file with the given contents, and I don't get any errors in VS Code (no red line, no entry in the Problems list, etc). If I try to compile the file, I get an error, "Error: conversion from All to A is invalid". Many other types of errors and warnings are working fine though

type
  All = enum
    a1
    a2
    b1
    b2
  A = range[a1..a2]
  B = range[b1..b2]

proc test(a: A) =
  echo a

test(b1)
@RSDuck
Copy link
Contributor

RSDuck commented Aug 10, 2022

the problem is that nim check doesn't report this error, which as far as I can tell is a compiler bug. I went ahead and created an issue for that: nim-lang/Nim#20192

Just as a side note, you're probably better off using https://github.com/saem/vscode-nim which is actively maintained. It also has some fixes for error reporting (for issues where the problem lies on the extension side), in case you encounter something similar again.

@zacaj
Copy link
Author

zacaj commented Aug 10, 2022

Thanks, I'll check that one out! I just grabbed the top extension in the list since it had the most users/stars :(

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

2 participants