Skip to content

Commit

Permalink
compare abs_name for abstract cast
Browse files Browse the repository at this point in the history
  • Loading branch information
fourst4r committed Apr 24, 2024
1 parent 135e69e commit 6fb0ca5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/std/cast.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ HL_PRIM void *hl_dyn_castp( void *data, hl_type *t, hl_type *to ) {
case TK2(HFUN,HDYN):
case TK2(HNULL,HDYN):
case TK2(HARRAY,HDYN):
case TK2(HABSTRACT,HABSTRACT):
// NO(HSTRUCT,HDYN)
return *(void**)data;
case TK2(HABSTRACT,HABSTRACT):
if ( ucmp(t->abs_name, to->abs_name) != 0 )
break;
return *(void**)data;
}
if( to->kind == HDYN )
return hl_make_dyn(data,t);
Expand Down

0 comments on commit 6fb0ca5

Please sign in to comment.