comparison dmd/cast.c @ 159:5acec6b2eef8 trunk

[svn r175] merged dmd 1.029
author ChristianK
date Thu, 01 May 2008 15:15:28 +0200
parents 5825d48b27d1
children a58d8f4b84df
comparison
equal deleted inserted replaced
158:287540c5f05e 159:5acec6b2eef8
957 ArrayLiteralExp *e = this; 957 ArrayLiteralExp *e = this;
958 Type *typeb = type->toBasetype(); 958 Type *typeb = type->toBasetype();
959 Type *tb = t->toBasetype(); 959 Type *tb = t->toBasetype();
960 if ((tb->ty == Tarray || tb->ty == Tsarray) && 960 if ((tb->ty == Tarray || tb->ty == Tsarray) &&
961 (typeb->ty == Tarray || typeb->ty == Tsarray) && 961 (typeb->ty == Tarray || typeb->ty == Tsarray) &&
962 tb->nextOf()->toBasetype()->ty != Tvoid) 962 // Not trying to convert non-void[] to void[]
963 !(tb->nextOf()->toBasetype()->ty == Tvoid && typeb->nextOf()->toBasetype()->ty != Tvoid))
963 { 964 {
964 if (tb->ty == Tsarray) 965 if (tb->ty == Tsarray)
965 { TypeSArray *tsa = (TypeSArray *)tb; 966 { TypeSArray *tsa = (TypeSArray *)tb;
966 if (elements->dim != tsa->dim->toInteger()) 967 if (elements->dim != tsa->dim->toInteger())
967 goto L1; 968 goto L1;