tov / dssl2

A data structures student language, version 2
MIT License
9 stars 5 forks source link

source location wrong in vector indexing error #34

Open rfindler opened 8 months ago

rfindler commented 8 months ago

This program:

#lang dssl2
let x = [1,2,3]
x[[1,2]]

produces this error:

. . git/exp/plt/racket/share/pkgs/dssl2/private/syntax.rkt:418:7: «vec».__index_ref__: contract violation
  expected: nat?
  given: [1, 2]
  in: the 1st argument of
      (-> nat? AnyC)
  contract from: «vec».__index_ref__
  blaming: method caller
   (assuming the contract is correct)
  at: /Users/robby/tmp.rkt:3:0

which has a source location inside dssl2 instead of inside the dssl2 program.