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

nim check crash due to typing error, lowest priority #10934

Closed
StefanSalewski opened this issue Mar 31, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@StefanSalewski
Copy link

commented Mar 31, 2019

iterator xclusters*[T](a: openarray[T]; s: static[int]): array[s, T] {.inline.} =
  var result: array[s, T]
  var i = 0
  while i < len(a):
    for j, x in mpairs(result):
      x = a[(i + j) mod len(a)]
    yield result
    inc(i)

proc t =
  let boundary = [1, 2, 3, 4, 5]
  for pcn in clusters(boundary, 3):
    var prev, curr, next: int
    (prev, curr, next) = pcn
    echo prev, curr, next

t()
hhh.nim(14, 26) Error: internal error: assignment requested for type: Error Type
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp check <file>

@Araq Araq closed this in cce8d3d Mar 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.