diff options
Diffstat (limited to 'gcc/d/dmd/dcast.d')
-rw-r--r-- | gcc/d/dmd/dcast.d | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/d/dmd/dcast.d b/gcc/d/dmd/dcast.d index 685987b734d..83978391e42 100644 --- a/gcc/d/dmd/dcast.d +++ b/gcc/d/dmd/dcast.d @@ -432,7 +432,7 @@ MATCH implicitConvTo(Expression e, Type t) return MATCH.nomatch; goto case Tuns8; case Tuns8: - //printf("value = %llu %llu\n", (dinteger_t)(unsigned char)value, value); + //printf("value = %llu %llu\n", cast(dinteger_t)cast(ubyte)value, value); if (cast(ubyte)value != value) return MATCH.nomatch; break; @@ -492,8 +492,8 @@ MATCH implicitConvTo(Expression e, Type t) break; case Tpointer: - //printf("type = %s\n", type.toBasetype()->toChars()); - //printf("t = %s\n", t.toBasetype()->toChars()); + //printf("type = %s\n", type.toBasetype().toChars()); + //printf("t = %s\n", t.toBasetype().toChars()); if (ty == Tpointer && e.type.toBasetype().nextOf().ty == t.toBasetype().nextOf().ty) { /* Allow things like: @@ -1107,6 +1107,10 @@ MATCH implicitConvTo(Expression e, Type t) MATCH visitCond(CondExp e) { + auto result = visit(e); + if (result != MATCH.nomatch) + return result; + MATCH m1 = e.e1.implicitConvTo(t); MATCH m2 = e.e2.implicitConvTo(t); //printf("CondExp: m1 %d m2 %d\n", m1, m2); @@ -2077,7 +2081,7 @@ Expression castTo(Expression e, Scope* sc, Type t, Type att = null) if (auto tsa = tb.isTypeSArray()) { size_t dim2 = cast(size_t)tsa.dim.toInteger(); - //printf("dim from = %d, to = %d\n", (int)se.len, (int)dim2); + //printf("dim from = %d, to = %d\n", cast(int)se.len, cast(int)dim2); // Changing dimensions if (dim2 != se.len) |