mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-12 04:58:18 +03:00
27 lines
556 B
Plaintext
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)]
|
|
;; ()))
|