dylan-lang/opendylan — Issue #122: Internal error when specifying dimensions of limited <array> type
Author: AndrewGlynn
Created: 2011-12-18 07:37:08+00:00
State: open

The following code generates an internal compiler error in version 2011.1:

define constant = limited(, of: , dimensions: #[3, 3]);
define constant $m :: = make(, fill: 0.0);

Here is the relevant compiler output:

Computing models for bugs.dylan

Internal error: {: 3, 3} is not of type {: #f, {}}
Exiting with return code -1

The error appears to have to do with the type of the value for `dimensions`.

Replacing `#[3, 3]` with `vector(3, 3)` gets rid of the error.
Removing the second line entirely gets rid of the error.
Removing the `dimensions` keyword argument gets rid of the error.
Removing the `:: ` type annotation from $m gets rid of the error.
The element type of `` appears to be irrelevant.
Adding "dimensions: #[3, 3]" to the call to `make` has no effect.

I can't tell if this is directly related to other issues surrounding the use of `size` for limited collection types.