Skip to content

Commit ed76f0b

Browse files
committed
handle indexing on GENERICs
1 parent f3a82de commit ed76f0b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/express/type.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ struct TypeBody_ {
227227
GLOBAL SCL_EXPRESS_EXPORT Type Type_Bad;
228228
GLOBAL SCL_EXPRESS_EXPORT Type Type_Unknown;
229229
GLOBAL SCL_EXPRESS_EXPORT Type Type_Dont_Care;
230-
GLOBAL SCL_EXPRESS_EXPORT Type Type_Runtime; /* indicates that this object can't be */
231-
/* calculated now but must be deferred */
232-
/* til (the mythical) runtime */
230+
GLOBAL SCL_EXPRESS_EXPORT Type Type_Runtime; /**< indicates that this object can't be
231+
calculated now but must be deferred
232+
until (the mythical) runtime */
233233
GLOBAL SCL_EXPRESS_EXPORT Type Type_Binary;
234234
GLOBAL SCL_EXPRESS_EXPORT Type Type_Boolean;
235235
GLOBAL SCL_EXPRESS_EXPORT Type Type_Enumeration;

src/express/expr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ Type EXPresolve_op_array_like( Expression e, Scope s ) {
666666
return( op1type );
667667
} else if( op1type == Type_Runtime ) {
668668
return( Type_Runtime );
669+
} else if( op1type->u.type->body->type == generic_ ) {
670+
return( Type_Generic );
669671
} else if( TYPEis_select( op1type ) ) {
670672

671673
/* FIXME Is it possible that the base type hasn't yet been resolved?

0 commit comments

Comments
 (0)