impc:ti:pref-check   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmti.xtm

Implementation

(define impc:ti:pref-check
  (lambda (ast vars kts request?)
    (let* ((a (impc:ti:type-check (cadr ast) vars kts request?)))
      (if *impc:ti:print-sub-checks* (println 'ptrref:> 'ast: ast 'a: a))
      ;; return type of ptrref is 'a' referenced
      (if (list? a)
          (set! a (car a)))
      (if (and (impc:ir:type? a)
               (impc:ir:pointer? a))
          (impc:ir:pointer++ a)
          (impc:compiler:print-bad-type-error a "pref needs a pointer argument")))))


Back to Index