handle indexing on GENERICs

This commit is contained in:
Mark Pictor
2011-12-18 19:34:14 -05:00
parent f3a82debec
commit ed76f0b625
2 changed files with 5 additions and 3 deletions
+3 -3
View File
@@ -227,9 +227,9 @@ struct TypeBody_ {
GLOBAL SCL_EXPRESS_EXPORT Type Type_Bad;
GLOBAL SCL_EXPRESS_EXPORT Type Type_Unknown;
GLOBAL SCL_EXPRESS_EXPORT Type Type_Dont_Care;
GLOBAL SCL_EXPRESS_EXPORT Type Type_Runtime; /* indicates that this object can't be */
/* calculated now but must be deferred */
/* til (the mythical) runtime */
GLOBAL SCL_EXPRESS_EXPORT Type Type_Runtime; /**< indicates that this object can't be
calculated now but must be deferred
until (the mythical) runtime */
GLOBAL SCL_EXPRESS_EXPORT Type Type_Binary;
GLOBAL SCL_EXPRESS_EXPORT Type Type_Boolean;
GLOBAL SCL_EXPRESS_EXPORT Type Type_Enumeration;
+2
View File
@@ -666,6 +666,8 @@ Type EXPresolve_op_array_like( Expression e, Scope s ) {
return( op1type );
} else if( op1type == Type_Runtime ) {
return( Type_Runtime );
} else if( op1type->u.type->body->type == generic_ ) {
return( Type_Generic );
} else if( TYPEis_select( op1type ) ) {
/* FIXME Is it possible that the base type hasn't yet been resolved?