2017-10-10 14:50:47 +03:00
|
|
|
;; This file contains examples of unsolved bugs
|
2017-10-12 15:35:28 +03:00
|
|
|
|
2018-01-30 17:22:07 +03:00
|
|
|
;; (load "Debug.carp")
|
|
|
|
;; (Debug.sanitize-addresses)
|
2017-12-15 17:31:56 +03:00
|
|
|
(project-set! "printAST" "true")
|
|
|
|
|
2018-01-28 08:17:23 +03:00
|
|
|
;; This shouldn't compile:
|
2018-01-28 07:56:03 +03:00
|
|
|
;; (defn faulty-repeat [n inpt]
|
|
|
|
;; (let [str ""]
|
|
|
|
;; (do
|
|
|
|
;; (for [i 0 n]
|
|
|
|
;; (set! &str &(append @str @inpt)))
|
|
|
|
;; @str)))
|
|
|
|
;; (defn main []
|
2018-01-28 08:17:23 +03:00
|
|
|
;; (let [strings (faulty-repeat 20 "x")]
|
2018-01-28 07:56:03 +03:00
|
|
|
;; (IO.println &strings)))
|
2018-01-30 17:22:07 +03:00
|
|
|
|
2018-02-01 19:29:45 +03:00
|
|
|
;; Instantiating generic struct with ref-type fails:
|
|
|
|
(deftype (Triv a) [x a])
|
|
|
|
(defn g [] (Triv.init "hej"))
|