expr->primary_expression.identifier);
}
} else if (op->type->base_type == GLSL_TYPE_STRUCT) {
- /* FINISHME: Handle field selection from structures. */
+ result = new ir_dereference(op, expr->primary_expression.identifier);
+
+ if (result->type->is_error()) {
+ _mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
+ "structure",
+ expr->primary_expression.identifier);
+ }
} else {
_mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
"non-structure / non-vector.",