85
86
static void stype_binop_tobject(stype_t *stype, stree_binop_t *binop,
86
87
tdata_item_t *ta, tdata_item_t *tb, tdata_item_t **rtitem);
88
static void stype_binop_tenum(stype_t *stype, stree_binop_t *binop,
89
tdata_item_t *ta, tdata_item_t *tb, tdata_item_t **rtitem);
90
static void stype_binop_tvref(stype_t *stype, stree_binop_t *binop,
91
tdata_item_t *ta, tdata_item_t *tb, tdata_item_t **rtitem);
88
93
static void stype_unop(stype_t *stype, stree_unop_t *unop,
89
94
tdata_item_t **rtitem);
91
96
tdata_item_t *ta, tdata_item_t **rtitem);
92
97
static void stype_new(stype_t *stype, stree_new_t *new,
93
98
tdata_item_t **rtitem);
99
static void stype_new_object_args(stype_t *stype, stree_new_t *new_op,
100
tdata_item_t *obj_ti);
95
102
static void stype_access(stype_t *stype, stree_access_t *access,
96
103
tdata_item_t **rtitem);
100
107
tdata_item_t *arg_ti, tdata_item_t **rtitem);
101
108
static void stype_access_tarray(stype_t *stype, stree_access_t *access,
102
109
tdata_item_t *arg_ti, tdata_item_t **rtitem);
110
static void stype_access_tebase(stype_t *stype, stree_access_t *access,
111
tdata_item_t *arg_ti, tdata_item_t **rtitem);
104
113
static void stype_call(stype_t *stype, stree_call_t *call,
105
114
tdata_item_t **rtitem);
115
static void stype_call_args(stype_t *stype, cspan_t *cspan, list_t *farg_tis,
116
tdata_item_t *fvarg_ti, list_t *args);
107
118
static void stype_index(stype_t *stype, stree_index_t *index,
108
119
tdata_item_t **rtitem);
225
241
if (sym == NULL) {
227
243
if (stype->current_csi != NULL) {
228
printf("Error: Symbol '%s' not found in '",
244
cspan_print(nameref->expr->cspan);
245
printf(" Error: Symbol '%s' not found in '",
229
246
strtab_get_str(nameref->name->sid));
230
247
symbol_print_fqn(csi_to_symbol(stype->current_csi));
233
printf("Error: Symbol '%s' not found.\n",
250
cspan_print(nameref->expr->cspan);
251
printf(" Error: Symbol '%s' not found.\n",
234
252
strtab_get_str(nameref->name->sid));
236
254
stype_note_error(stype);
259
277
tobject->static_ref = b_true;
260
278
tobject->csi = csi;
281
/* It is not possible to reference a constructor explicitly. */
263
printf("referenced name is deleg\n");
264
284
deleg = symbol_to_deleg(sym);
265
285
assert(deleg != NULL);
266
286
/* Type delegate if it has not been typed yet. */
267
287
stype_deleg(stype, deleg);
268
288
titem = deleg->titem;
291
enum_d = symbol_to_enum(sym);
292
assert(enum_d != NULL);
294
titem = tdata_item_new(tic_tebase);
295
tebase = tdata_ebase_new();
296
titem->u.tebase = tebase;
298
/* This is an enum base reference. */
299
tebase->enum_d = enum_d;
271
302
fun = symbol_to_fun(sym);
272
303
assert(fun != NULL);
321
353
static void stype_self_ref(stype_t *stype, stree_self_ref_t *self_ref,
322
354
tdata_item_t **rtitem)
356
stree_csi_t *cur_csi;
358
tdata_object_t *tobject;
324
360
#ifdef DEBUG_TYPE_TRACE
325
printf("Evaluate type of self reference.\n");
361
cspan_print(self_ref->expr->cspan);
362
printf(" Evaluate type of self reference.\n");
367
cur_csi = stype->proc_vr->proc->outer_symbol->outer_csi;
369
/* No global symbols should have procedures. */
370
assert(cur_csi != NULL);
372
/* Construct type item. */
373
titem = tdata_item_new(tic_tobject);
374
tobject = tdata_object_new();
375
titem->u.tobject = tobject;
377
tobject->static_ref = b_false;
378
tobject->csi = cur_csi;
379
list_init(&tobject->targs);
333
384
/** Type a binary operation.
343
394
tdata_item_t *titem1, *titem2;
345
396
#ifdef DEBUG_TYPE_TRACE
346
printf("Evaluate type of binary operation.\n");
397
cspan_print(binop->expr->cspan);
398
printf(" Evaluate type of binary operation.\n");
348
400
stype_expr(stype, binop->arg1);
349
401
stype_expr(stype, binop->arg2);
351
403
titem1 = binop->arg1->titem;
352
404
titem2 = binop->arg2->titem;
354
if (titem1 == NULL || titem2 == NULL) {
355
printf("Error: Binary operand has no value.\n");
406
if (titem1 == NULL) {
407
cspan_print(binop->arg1->cspan);
408
printf(" Error: Binary operand has no value.\n");
409
stype_note_error(stype);
410
*rtitem = stype_recovery_titem(stype);
414
if (titem2 == NULL) {
415
cspan_print(binop->arg2->cspan);
416
printf(" Error: Binary operand has no value.\n");
356
417
stype_note_error(stype);
357
418
*rtitem = stype_recovery_titem(stype);
366
427
equal = tdata_item_equal(titem1, titem2);
367
428
if (equal != b_true) {
368
printf("Error: Binary operation arguments "
429
cspan_print(binop->expr->cspan);
430
printf(" Error: Binary operation arguments "
369
431
"have different types ('");
370
432
tdata_item_print(titem1);
371
433
printf("' and '");
383
445
case tic_tobject:
384
446
stype_binop_tobject(stype, binop, titem1, titem2, rtitem);
449
stype_binop_tenum(stype, binop, titem1, titem2, rtitem);
452
stype_binop_tvref(stype, binop, titem1, titem2, rtitem);
387
printf("Error: Binary operation on value which is not of a "
455
cspan_print(binop->expr->cspan);
456
printf(" Error: Binary operation on value which is not of a "
388
457
"supported type (found '");
389
458
tdata_item_print(titem1);
459
528
/* Arithmetic -> error */
460
printf("Error: Binary operation (%d) on booleans.\n",
529
cspan_print(binop->expr->cspan);
530
printf(" Error: Binary operation (%d) on booleans.\n",
462
532
stype_note_error(stype);
463
533
*rtitem = stype_recovery_titem(stype);
537
/* Boolean -> boolean type */
467
542
res_ti = tdata_item_new(tic_tprimitive);
500
/* Arithmetic -> error */
501
printf("Error: Binary operation (%d) on characters.\n",
577
/* Arithmetic, boolean -> error */
578
cspan_print(binop->expr->cspan);
579
printf(" Error: Binary operation (%d) on characters.\n",
503
581
stype_note_error(stype);
577
665
tprimitive_class_t rtpc;
578
666
tdata_item_t *res_ti;
580
if (binop->bc != bo_plus) {
581
printf("Unimplemented: Binary operation(%d) "
582
"on strings.\n", binop->bc);
671
/* Comparison -> boolean type */
675
/* Concatenation -> string type */
688
/* Ordering, arithmetic, boolean -> error */
689
cspan_print(binop->expr->cspan);
690
printf(" Error: Binary operation (%d) on strings.\n",
583
692
stype_note_error(stype);
584
*rtitem = stype_recovery_titem(stype);
590
697
res_ti = tdata_item_new(tic_tprimitive);
591
698
res_ti->u.tprimitive = tdata_primitive_new(rtpc);
644
752
res_ti = stype_boolean_titem(stype);
647
printf("Error: Binary operation (%d) on objects.\n",
649
stype_note_error(stype);
650
*rtitem = stype_recovery_titem(stype);
755
cspan_print(binop->expr->cspan);
756
printf(" Error: Binary operation (%d) on objects.\n",
758
stype_note_error(stype);
759
*rtitem = stype_recovery_titem(stype);
766
/** Type a binary operation with arguments of an enum type.
768
* @param stype Static typing object
769
* @param binop Binary operation
770
* @param ta Type of first argument
771
* @param tb Type of second argument
772
* @param rtitem Place to store result type
774
static void stype_binop_tenum(stype_t *stype, stree_binop_t *binop,
775
tdata_item_t *ta, tdata_item_t *tb, tdata_item_t **rtitem)
777
tdata_item_t *res_ti;
779
assert(ta->tic == tic_tenum);
780
assert(tb->tic == tic_tenum);
785
/* Comparison -> boolean type */
786
res_ti = stype_boolean_titem(stype);
789
cspan_print(binop->expr->cspan);
790
printf(" Error: Binary operation (%d) on values of enum "
791
"type.\n", binop->bc);
792
stype_note_error(stype);
793
*rtitem = stype_recovery_titem(stype);
800
/** Type a binary operation with arguments of a variable type.
802
* @param stype Static typing object
803
* @param binop Binary operation
804
* @param ta Type of first argument
805
* @param tb Type of second argument
806
* @param rtitem Place to store result type
808
static void stype_binop_tvref(stype_t *stype, stree_binop_t *binop,
809
tdata_item_t *ta, tdata_item_t *tb, tdata_item_t **rtitem)
811
tdata_item_t *res_ti;
813
assert(ta->tic == tic_tvref || (ta->tic == tic_tprimitive &&
814
ta->u.tprimitive->tpc == tpc_nil));
815
assert(tb->tic == tic_tvref || (tb->tic == tic_tprimitive &&
816
tb->u.tprimitive->tpc == tpc_nil));
821
/* Comparison -> boolean type */
822
res_ti = stype_boolean_titem(stype);
825
cspan_print(binop->expr->cspan);
826
printf(" Error: Binary operation (%d) on variable types.\n",
828
stype_note_error(stype);
829
*rtitem = stype_recovery_titem(stype);
658
836
/** Type a unary operation.
683
862
stype_unop_tprimitive(stype, unop, titem, rtitem);
686
printf("Error: Unary operation on value which is not of a "
865
cspan_print(unop->arg->cspan);
866
printf(" Error: Unary operation on value which is not of a "
687
867
"supported type (found '");
688
868
tdata_item_print(titem);
722
printf("Error: Unary operator applied on unsupported "
902
cspan_print(unop->arg->cspan);
903
printf(" Error: Unary operator applied on unsupported "
723
904
"primitive type %d.\n", ta->u.tprimitive->tpc);
724
905
stype_note_error(stype);
725
906
*rtitem = stype_recovery_titem(stype);
753
935
if ((*rtitem)->tic == tic_ignore) {
754
936
/* An error occured when evaluating the type expression. */
755
937
stype_note_error(stype);
938
*rtitem = stype_recovery_titem(stype);
942
if ((*rtitem)->tic == tic_tobject)
943
stype_new_object_args(stype, new_op, *rtitem);
946
/** Type a new object operation arguments.
948
* @param stype Static typing object
949
* @param new_op @c new operation
951
static void stype_new_object_args(stype_t *stype, stree_new_t *new_op,
952
tdata_item_t *obj_ti)
956
stree_symbol_t *ctor_sym;
957
stree_ident_t *ctor_ident;
958
tdata_fun_sig_t *tsig;
960
assert(obj_ti->tic == tic_tobject);
961
csi = obj_ti->u.tobject->csi;
962
ctor_ident = stree_ident_new();
963
ctor_ident->sid = strtab_get_sid(CTOR_IDENT);
965
/* Find constructor. */
966
ctor_sym = symbol_search_csi_no_base(stype->program, csi,
969
if (ctor_sym == NULL && !list_is_empty(&new_op->ctor_args)) {
970
cspan_print(new_op->expr->cspan);
971
printf(" Error: Passing arguments to 'new' but no "
972
"constructor found.\n");
973
stype_note_error(stype);
977
if (ctor_sym == NULL)
980
ctor = symbol_to_ctor(ctor_sym);
981
assert(ctor != NULL);
983
/* Type constructor header if it has not been typed yet. */
984
stype_ctor_header(stype, ctor);
985
if (ctor->titem->tic == tic_ignore)
988
assert(ctor->titem->tic == tic_tfun);
989
tsig = ctor->titem->u.tfun->tsig;
991
stype_call_args(stype, new_op->expr->cspan, &tsig->arg_ti,
992
tsig->varg_ti, &new_op->ctor_args);
759
995
/** Type a member access operation.
768
1004
tdata_item_t *arg_ti;
770
1006
#ifdef DEBUG_TYPE_TRACE
771
printf("Evaluate type of access operation.\n");
1007
cspan_print(access->expr->cspan);
1008
printf(" Evaluate type of access operation.\n");
773
1010
stype_expr(stype, access->arg);
774
1011
arg_ti = access->arg->titem;
776
1013
if (arg_ti == NULL) {
777
printf("Error: Argument of access has no value.\n");
1014
cspan_print(access->arg->cspan);
1015
printf(" Error: Argument of access operation has no value.\n");
778
1016
stype_note_error(stype);
779
1017
*rtitem = stype_recovery_titem(stype);
791
1029
stype_access_tarray(stype, access, arg_ti, rtitem);
793
1031
case tic_tdeleg:
794
printf("Error: Using '.' operator on a function.\n");
1032
cspan_print(access->arg->cspan);
1033
printf(" Error: Using '.' operator on a delegate.\n");
1034
stype_note_error(stype);
1035
*rtitem = stype_recovery_titem(stype);
1038
stype_access_tebase(stype, access, arg_ti, rtitem);
1041
cspan_print(access->arg->cspan);
1042
printf(" Error: Using '.' operator on expression of enum "
795
1044
stype_note_error(stype);
796
1045
*rtitem = stype_recovery_titem(stype);
799
printf("Error: Using '.' operator on a delegate.\n");
1048
cspan_print(access->arg->cspan);
1049
printf(" Error: Using '.' operator on a function.\n");
800
1050
stype_note_error(stype);
801
1051
*rtitem = stype_recovery_titem(stype);
804
1054
/* Cannot allow this without some constraint. */
805
printf("Error: Using '.' operator on generic data.\n");
1055
cspan_print(access->arg->cspan);
1056
printf(" Error: Using '.' operator on generic data.\n");
806
1057
*rtitem = stype_recovery_titem(stype);
808
1059
case tic_ignore:
821
1072
static void stype_access_tprimitive(stype_t *stype, stree_access_t *access,
822
1073
tdata_item_t *arg_ti, tdata_item_t **rtitem)
828
printf("Error: Unimplemented: Accessing primitive type '");
829
tdata_item_print(arg_ti);
831
stype_note_error(stype);
832
*rtitem = stype_recovery_titem(stype);
1077
/* Box the value. */
1078
access->arg = stype_box_expr(stype, access->arg);
1079
if (access->arg->titem->tic == tic_ignore) {
1080
*rtitem = stype_recovery_titem(stype);
1084
/* Access the boxed object. */
1085
stype_access_tobject(stype, access, access->arg->titem, rtitem);
835
1088
/** Type an object access operation.
863
1117
if (member_sym == NULL) {
864
1118
/* No such member found. */
865
printf("Error: CSI '");
1119
cspan_print(access->member_name->cspan);
1120
printf(" Error: CSI '");
866
1121
symbol_print_fqn(csi_to_symbol(tobject->csi));
867
1122
printf("' has no member named '%s'.\n",
868
1123
strtab_get_str(access->member_name->sid));
879
1134
switch (member_sym->sc) {
881
printf("Error: Accessing object member which is nested "
1136
cspan_print(access->member_name->cspan);
1137
printf(" Error: Accessing object member which is nested "
883
1139
stype_note_error(stype);
884
1140
*rtitem = stype_recovery_titem(stype);
1143
/* It is not possible to reference a constructor explicitly. */
887
printf("Error: Accessing object member which is a "
1146
cspan_print(access->member_name->cspan);
1147
printf(" Error: Accessing object member which is a "
889
1149
stype_note_error(stype);
890
1150
*rtitem = stype_recovery_titem(stype);
1153
enum_d = symbol_to_enum(member_sym);
1154
assert(enum_d != NULL);
1155
/* Type enum if it has not been typed yet. */
1156
stype_enum(stype, enum_d);
1157
mtitem = enum_d->titem;
893
1160
fun = symbol_to_fun(member_sym);
894
1161
assert(fun != NULL);
939
printf("Error: Unimplemented: Accessing array type '");
1206
cspan_print(access->arg->cspan);
1207
printf(" Error: Unimplemented: Accessing array type '");
940
1208
tdata_item_print(arg_ti);
942
1210
stype_note_error(stype);
943
1211
*rtitem = stype_recovery_titem(stype);
1214
/** Type an enum access operation.
1216
* @param stype Static typing object
1217
* @param access Member access operation
1218
* @param arg_ti Base type
1219
* @param rtitem Place to store result type
1221
static void stype_access_tebase(stype_t *stype, stree_access_t *access,
1222
tdata_item_t *arg_ti, tdata_item_t **rtitem)
1224
tdata_ebase_t *tebase;
1225
tdata_enum_t *tenum;
1226
tdata_item_t *mtitem;
1229
#ifdef DEBUG_TYPE_TRACE
1230
printf("Type an ebase access operation.\n");
1232
assert(arg_ti->tic == tic_tebase);
1233
tebase = arg_ti->u.tebase;
1235
/* Look for a member with the specified name. */
1236
embr = stree_enum_find_mbr(tebase->enum_d, access->member_name);
1239
/* No such member found. */
1240
cspan_print(access->member_name->cspan);
1241
printf(" Error: Enum type '");
1242
symbol_print_fqn(enum_to_symbol(tebase->enum_d));
1243
printf("' has no member named '%s'.\n",
1244
strtab_get_str(access->member_name->sid));
1245
stype_note_error(stype);
1246
*rtitem = stype_recovery_titem(stype);
1250
#ifdef DEBUG_RUN_TRACE
1251
printf("Found member '%s'.\n",
1252
strtab_get_str(access->member_name->sid));
1255
mtitem = tdata_item_new(tic_tenum);
1256
tenum = tdata_enum_new();
1257
mtitem->u.tenum = tenum;
1258
tenum->enum_d = tebase->enum_d;
946
1264
/** Type a call operation.
948
1266
* @param stype Static typing object
952
1270
static void stype_call(stype_t *stype, stree_call_t *call,
953
1271
tdata_item_t **rtitem)
955
list_node_t *fargt_n;
956
tdata_item_t *farg_ti;
957
tdata_item_t *varg_ti;
963
1273
tdata_item_t *fun_ti;
964
1274
tdata_fun_sig_t *tsig;
968
1276
#ifdef DEBUG_TYPE_TRACE
969
printf("Evaluate type of call operation.\n");
1277
cspan_print(call->expr->cspan);
1278
printf(" Evaluate type of call operation.\n");
971
1280
/* Type the function */
972
1281
stype_expr(stype, call->fun);
997
/* Type and check the arguments. */
998
fargt_n = list_first(&tsig->arg_ti);
999
arg_n = list_first(&call->args);
1307
/* Type call arguments. */
1308
stype_call_args(stype, call->expr->cspan, &tsig->arg_ti, tsig->varg_ti,
1311
if (tsig->rtype != NULL) {
1312
/* XXX Might be better to clone here. */
1313
*rtitem = tsig->rtype;
1319
/** Type call arguments.
1321
* Type arguments in call to a function or constructor.
1323
* @param stype Static typing object
1324
* @param cpsan Cspan to print in case of error.
1325
* @param farg_tis Formal argument types (list of tdata_item_t)
1326
* @param args Real arguments (list of stree_expr_t)
1328
static void stype_call_args(stype_t *stype, cspan_t *cspan, list_t *farg_tis,
1329
tdata_item_t *fvarg_ti, list_t *args)
1331
list_node_t *fargt_n;
1332
tdata_item_t *farg_ti;
1333
tdata_item_t *varg_ti;
1341
/* Type and check regular arguments. */
1342
fargt_n = list_first(farg_tis);
1343
arg_n = list_first(args);
1002
1346
while (fargt_n != NULL && arg_n != NULL) {
1007
1351
/* XXX Because of overloaded bultin WriteLine */
1008
1352
if (farg_ti == NULL) {
1009
1353
/* Skip the check */
1010
fargt_n = list_next(&tsig->arg_ti, fargt_n);
1011
arg_n = list_next(&call->args, arg_n);
1354
fargt_n = list_next(farg_tis, fargt_n);
1355
arg_n = list_next(args, arg_n);
1018
1362
/* Patch code with augmented expression. */
1019
1363
list_node_setdata(arg_n, carg);
1021
fargt_n = list_next(&tsig->arg_ti, fargt_n);
1022
arg_n = list_next(&call->args, arg_n);
1365
fargt_n = list_next(farg_tis, fargt_n);
1366
arg_n = list_next(args, arg_n);
1025
1369
/* Type and check variadic arguments. */
1026
if (tsig->varg_ti != NULL) {
1370
if (fvarg_ti != NULL) {
1027
1371
/* Obtain type of packed argument. */
1028
farg_ti = tsig->varg_ti;
1030
1374
/* Get array element type */
1031
1375
assert(farg_ti->tic == tic_tarray);
1041
1385
/* Patch code with augmented expression. */
1042
1386
list_node_setdata(arg_n, carg);
1044
arg_n = list_next(&call->args, arg_n);
1388
arg_n = list_next(args, arg_n);
1048
1392
if (fargt_n != NULL) {
1049
printf("Error: Too few arguments to function.\n");
1394
printf(" Error: Too few arguments.\n");
1050
1395
stype_note_error(stype);
1053
1398
if (arg_n != NULL) {
1054
printf("Error: Too many arguments to function.\n");
1400
printf(" Error: Too many arguments.\n");
1055
1401
stype_note_error(stype);
1058
if (tsig->rtype != NULL) {
1059
/* XXX Might be better to clone here. */
1060
*rtitem = tsig->rtype;
1066
1405
/** Type an indexing operation.
1102
1442
stype_index_tarray(stype, index, base_ti, rtitem);
1104
1444
case tic_tdeleg:
1105
printf("Error: Indexing a delegate.\n");
1445
cspan_print(index->base->cspan);
1446
printf(" Error: Indexing a delegate.\n");
1447
stype_note_error(stype);
1448
*rtitem = stype_recovery_titem(stype);
1451
cspan_print(index->base->cspan);
1452
printf(" Error: Indexing an enum declaration.\n");
1453
stype_note_error(stype);
1454
*rtitem = stype_recovery_titem(stype);
1457
cspan_print(index->base->cspan);
1458
printf(" Error: Indexing an enum value.\n");
1106
1459
stype_note_error(stype);
1107
1460
*rtitem = stype_recovery_titem(stype);
1110
printf("Error: Indexing a function.\n");
1463
cspan_print(index->base->cspan);
1464
printf(" Error: Indexing a function.\n");
1111
1465
stype_note_error(stype);
1112
1466
*rtitem = stype_recovery_titem(stype);
1114
1468
case tic_tvref:
1115
1469
/* Cannot allow this without some constraint. */
1116
printf("Error: Indexing generic data.\n");
1470
cspan_print(index->base->cspan);
1471
printf(" Error: Indexing generic data.\n");
1117
1472
*rtitem = stype_recovery_titem(stype);
1119
1474
case tic_ignore:
1189
1546
idx_sym = symbol_search_csi(stype->program, tobject->csi, idx_ident);
1191
1548
if (idx_sym == NULL) {
1192
printf("Error: Indexing object of type '");
1549
cspan_print(index->base->cspan);
1550
printf(" Error: Indexing object of type '");
1193
1551
tdata_item_print(base_ti);
1194
1552
printf("' which does not have an indexer.\n");
1195
1553
stype_note_error(stype);
1255
1614
if (arg_count != base_ti->u.tarray->rank) {
1256
printf("Error: Using %d indices with array of rank %d.\n",
1615
cspan_print(index->expr->cspan);
1616
printf(" Error: Using %d indices with array of rank %d.\n",
1257
1617
arg_count, base_ti->u.tarray->rank);
1258
1618
stype_note_error(stype);
1273
1633
stree_expr_t *csrc;
1275
1635
#ifdef DEBUG_TYPE_TRACE
1276
printf("Evaluate type of assignment.\n");
1636
cspan_print(assign->expr->cspan);
1637
printf(" Evaluate type of assignment.\n");
1278
1639
stype_expr(stype, assign->dest);
1279
1640
stype_expr(stype, assign->src);
1296
1657
tdata_item_t *titem;
1298
1659
#ifdef DEBUG_TYPE_TRACE
1299
printf("Evaluate type of @c as conversion.\n");
1660
cspan_print(as_op->expr->cspan);
1661
printf(" Evaluate type of @c as conversion.\n");
1301
1663
stype_expr(stype, as_op->arg);
1302
1664
run_texpr(stype->program, stype->current_csi, as_op->dtype, &titem);
1304
1666
/* Check that target type is derived from argument type. */
1305
1667
if (tdata_is_ti_derived_from_ti(titem, as_op->arg->titem) != b_true) {
1306
printf("Error: Target of 'as' operator '");
1668
cspan_print(as_op->dtype->cspan);
1669
printf(" Error: Target of 'as' operator '");
1307
1670
tdata_item_print(titem);
1308
1671
printf("' is not derived from '");
1309
1672
tdata_item_print(as_op->arg->titem);