kadena-io / pact

The Pact Smart Contract Language
https://docs.kadena.io/build/pact
BSD 3-Clause "New" or "Revised" License
581 stars 100 forks source link

invariant violation: free variable unexpectedly found #1250

Closed rsoeldner closed 1 year ago

rsoeldner commented 1 year ago
(module T G
  (defcap G () true)

  (defun a1:[integer] (x: [integer])
       (map (+ 1) x))

  (defun t: [[integer]] ()
    (map (a1) [[1]])))

(typecheck'T)
(verify 'T true)

result in:

pact> (load "example.repl" true)
"Loading example.repl..."
"Loaded module T, hash fLjicD9N6tX0IWkEjPt-eKxMqtxBp4qsEvjyseXsO4c"
"Typecheck T: success"
"Verification of T failed"
example.repl:5:7:OutputFailure: invariant violation: free variable unexpectedly found
rsoeldner commented 1 year ago

closed by #1251