tov / dssl2

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

Bad Error Message with Dynamic Arrays #15

Closed stamourv closed 4 years ago

stamourv commented 4 years ago

This program:

#lang dssl2
import array
let x = array()
x[0]

produces this internal error:

dssl-printer: format string did not match number of params
  format string:   'Array index out of bounds: ~a >= ~a'
  expected params: 0
  actual params:   2

Thanks to Sonam Ford for the test case.

tov commented 4 years ago

Eeek, thanks! I think I know both what causes this in the code and the refactoring where I introduced the bug. Will fix.

On Fri, Mar 20, 2020 at 2:40 PM Vincent St-Amour notifications@github.com wrote:

This program:

lang dssl2

import array let x = array() x[0]

produces this internal error:

dssl-printer: format string did not match number of params format string: 'Array index out of bounds: ~a >= ~a' expected params: 0 actual params: 2

Thanks to Sonam Ford for the test case.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tov/dssl2/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFS3BFTJBPMCYKT6WQ7PN3RIPBD7ANCNFSM4LQTFRUQ .

-- cs.northwestern.edu/~jesse https://www.cs.northwestern.edu/~jesse/

tov commented 4 years ago

Okay, fixed and released. Thanks again, and please give Sonan my gratitude.