view tests/mini/classes10.d @ 1115:af625ea2d3cf

Call _d_array_bounds when an associative array is indexed with a non-existent key (unless it's being assigned to). Closes #233.
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 14 Mar 2009 01:22:05 +0100
parents 1bb99290e03a
children
line wrap: on
line source

module classes10;

class C
{
    int i;
    override char[] toString()
    {
        return "foobar";
    }
}

void main()
{
    Object o = new C;
    char[] s = o.toString();
    assert(s == "foobar");
}