Enumerating an unknown datatype does not raise an error automatically anymore.

[GB.JIT]
* BUG: Enumerating an unknown datatype does not raise an error automatically anymore.
This commit is contained in:
gambas 2019-06-18 09:50:56 +02:00
parent 988546ad28
commit cfb4a9d2a8
2 changed files with 2 additions and 2 deletions

View file

@ -529,7 +529,7 @@ enum
#define CALL_UNKNOWN(_pc) ({ JIT.call_unknown(&pc[_pc], &sp); })
#define ENUM_FIRST(_code, _plocal, _penum) ({ GB.Unref(&(_penum).value); (_penum).type = 0; JIT.enum_first(_code, (GB_VALUE *)&_plocal, (GB_VALUE*)&_penum); })
#define ENUM_FIRST(_code, _plocal, _penum) ({ GB.Unref(&(_penum).value); (_penum).type = 0; JIT.enum_first(_code, (GB_VALUE *)&_plocal, (GB_VALUE *)&_penum); })
#define ENUM_NEXT(_code, _plocal, _penum, _label) ({ \
SP = sp; \

View file

@ -3078,7 +3078,7 @@ _ENUM_FIRST:
index = GET_XX() - func->n_local;
type = get_type(-1);
if (!TYPE_is_object(type))
if (!TYPE_is_object(type) && type != T_UNKNOWN)
{
JIT_print(" THROW(E_NOBJECT);\n");
pop_stack(1);