digitalmars.D.bugs - Assertion failure: 'f' on line 2695 in file 'expression.c'
- J C Calvarese (18/18) Jun 09 2004 This code (cut down from Mike Parker's Derelict project) causes an
- J C Calvarese (16/19) Jun 09 2004 Here's a shorter version (same problem):
- Mike Parker (7/30) Jun 10 2004 I've worked it out. The problem is the extra set of parentheses after
This code (cut down from Mike Parker's Derelict project) causes an assertion in the compiler: Assertion failure: 'f' on line 2695 in file 'expression.c' private import std.loader; struct SDL_version {} void SDL_VERSION(SDL_version* X) {} extern(C): typedef SDL_version* function() pfSDL_lv(); pfSDL_lv SDL_lv; private HXModule hsdl; public void DSDL_Load() { SDL_lv = cast(pfSDL_lv) ExeModule_GetSymbol(hsdl, "SDL_lv"); } /+ lv = Linked_Version +/ -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 09 2004
J C Calvarese wrote:This code (cut down from Mike Parker's Derelict project) causes an assertion in the compiler: Assertion failure: 'f' on line 2695 in file 'expression.c'Here's a shorter version (same problem): struct v {} typedef v* function() p(); p pvar; void* Get() { return null; } void Load() { pvar = cast(p) Get(); } -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 09 2004
J C Calvarese wrote:J C Calvarese wrote:I've worked it out. The problem is the extra set of parentheses after the function name in the declaration: typedef v* function() p(); ^ here A typo, of course <blush>. So is this a situation where the compiler should spit out an error along the lines of "Expected ; found ()"?This code (cut down from Mike Parker's Derelict project) causes an assertion in the compiler: Assertion failure: 'f' on line 2695 in file 'expression.c'Here's a shorter version (same problem): struct v {} typedef v* function() p(); p pvar; void* Get() { return null; } void Load() { pvar = cast(p) Get(); }
Jun 10 2004