Mercurial > projects > ldc
view demos/sdldemo1.d @ 1226:00f377e03423
Fix a problem which occurred when a function type was forward-referenced by
parameter types.
This was intended to fix the following test case:
{{{
void delegate(Hit) dg;
struct Hit { void delegate(Hit) a; }
}}}
which ChristianK reduced from a problem downs had on IRC.
It also seems to fix mini/compile_delegate.d (which turns out to be quite
similar, but produced a different error message).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 19 Apr 2009 23:15:03 +0200 |
parents | 27b2f40bdb58 |
children |
line wrap: on
line source
module sdldemo1; import sdl; void main() { auto disp = SDL_SetVideoMode(640,480,0,SDL_HWSURFACE|SDL_DOUBLEBUF); auto r = SDL_Rect(0,190,100,100); auto c = SDL_MapRGBA(disp.format,255,100,0,255); while (r.x < disp.w-100) { SDL_FillRect(disp, null, 0); SDL_FillRect(disp, &r, c); SDL_Flip(disp); r.x++; } }