digego / extempore

A cyber-physical programming environment
1.41k stars 127 forks source link

Windows generics test bug #250

Open benswift opened 8 years ago

benswift commented 8 years ago

In tests/core/generics.xtm, the make_shapes test crashes Extempore. However, a small change (add a println) to the Rectangle deconstructor fixes the problem.

;; deconstructor
(bind-func Rectangle:[!b,Shape{!a}*,[!b,!a,!a,!a,!a]*,[!b]*]*
  (lambda (s success fail)
    (if (<> (tref s 0) 2)
        (fail)
        (let ((r:ShapeRectangle* (tref s 2)))
          (success (tref r 0) (tref r 1) (tref r 2) (tref r 3))
          (println "bugfixer!"))))) ;; if this println is removed, it crashes