Carp/examples/bugs.carp

27 lines
556 B
Plaintext

;; This file contains examples of unsolved bugs
(load "Debug.carp")
(project-set! "printAST" "true")
(Debug.sanitize-addresses)
;; This shouldn't compile:
;; (defn faulty-repeat [n inpt]
;; (let [str ""]
;; (do
;; (for [i 0 n]
;; (set! &str &(append @str @inpt)))
;; @str)))
;; (defn main []
;; (let [strings (faulty-repeat 20 "x")]
;; (IO.println &strings)))
;; ANOTHER BUG
;; (use Array)
;; (defn main []
;; (let [a [[1]]
;; b [1]
;; c1 (count &a)
;; c2 (count &b)]
;; ()))