globals not refined added by megane on Fri Jun 15 07:54:32 2018

(: g1 (list-of fixnum))
(define g1 '())
;; Aliased global gets refined
(let ((a g1))
  (compiler-typecase a ((list-of fixnum) 1))
  (if (null? a)
      (compiler-typecase a (null 1))
      (compiler-typecase a ((not null) 1))))

(: g2 (list-of fixnum))
(define g2 '())
(if (null? g2)
    (compiler-typecase g2 (null 1)) ;; <- not null here
    (compiler-typecase g2 ((pair fixnum (list-of fixnum)) 1)))

;; $ csc -O3 globals.scm
;; 
;; Error: at toplevel:
;;   (globals.scm:13) no clause applies in `compiler-typecase' for expression of type `(list-of fixnum)':
;;     null