nim-lang/nimsuggest

Crash on jsffi

keiviv opened this issue · 0 comments

Crashes on load with std/jsffi — including on the example from the official doc:

import std/jsffi

var document {.importc, nodecl.}: JsObject
var console {.importc, nodecl.}: JsObject
proc jq(selector: JsObject): JsObject {.importjs: "$$(#)".}

proc main =
  jq(document).ready(proc() = # <-- Crashes here.
    console.log("Hello nimlsp")
  )
nimsuggest --log nimlsp_crash.nim
fatal.nim(53)            sysFatal
Error: unhandled exception: semcall.nim(235, 18) `nArg != nil`  [AssertionDefect]

Originally issued at nimlsp.