errors-arr.scm 597 B

12345678910111213141516
  1. (define (foo1 x::array2 i::int)
  2. (x i))
  3. ;; Diagnostic: errors-arr.scm:2:3: warning - array has rank 2 but there are 1 indexes
  4. (define (foo2 x::array1[double] i::int)
  5. (x))
  6. ;; Diagnostic: errors-arr.scm:6:3: warning - array has rank 1 but there are 0 indexes
  7. (define (foo3 x::array2[integer] i::int j::int)::string
  8. (x i j))
  9. ;; Diagnostic: errors-arr.scm:10:3: warning - type integer is incompatible with required type string
  10. (define (foo4 x::array2[double] i::int j::int)::string
  11. (x i j))
  12. ;; Diagnostic: errors-arr.scm:14:3: warning - type double is incompatible with required type string