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

Static + type conversion in type section for ranges #7609

Closed
mratsim opened this issue Apr 14, 2018 · 0 comments
Closed

Static + type conversion in type section for ranges #7609

mratsim opened this issue Apr 14, 2018 · 0 comments

Comments

@mratsim
Copy link
Collaborator

mratsim commented Apr 14, 2018

The following with static[int8] compiles:

type
  Coord*[N: static[int8]] = tuple[col, row: range[0'i8 .. (N-1)]]
  Point*[N: static[int8]] = range[0'i16 .. N.int16 * N.int16 - 1]

But with static[int] it doesn't.
Error: type mismatch: got <N> but expected 'int8'

type
  Coord*[N: static[int]] = tuple[col, row: range[0'i8 .. (N.int8-1)]]
  Point*[N: static[int]] = range[0'i16 .. N.int16 * N.int16 - 1]
@ghost ghost added the Static[T] label Apr 14, 2018
LemonBoy added a commit to LemonBoy/Nim that referenced this issue Jan 19, 2019
Drop the outer tyStatic shell then perform the check.

Fixes nim-lang#7609
Araq pushed a commit that referenced this issue Jan 21, 2019
Drop the outer tyStatic shell then perform the check.

Fixes #7609
ThomasTJdev pushed a commit to ThomasTJdev/Nim that referenced this issue Jan 27, 2019
Drop the outer tyStatic shell then perform the check.

Fixes nim-lang#7609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant