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 authored Apr 24, 2024
1 parent 135e69e commit aadc7bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/std/cast.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ HL_PRIM void *hl_dyn_castp( void *data, hl_type *t, hl_type *to ) {
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 aadc7bf

Please sign in to comment.