Skip to content

Commit aadc7bf

Browse files
authored
compare abs_name for abstract cast
1 parent 135e69e commit aadc7bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/std/cast.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ HL_PRIM void *hl_dyn_castp( void *data, hl_type *t, hl_type *to ) {
216216
case TK2(HABSTRACT,HABSTRACT):
217217
// NO(HSTRUCT,HDYN)
218218
return *(void**)data;
219+
case TK2(HABSTRACT,HABSTRACT):
220+
if ( ucmp(t->abs_name, to->abs_name) != 0 )
221+
break;
222+
return *(void**)data;
219223
}
220224
if( to->kind == HDYN )
221225
return hl_make_dyn(data,t);

0 commit comments

Comments
 (0)