mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 17:43:14 +01:00
Disregard modifiers when checking for initializer type match.
Previously, only const'ness was dropped, but DMD 2.060 started to emit initializers with incompatible shared modifiers as well.
This commit is contained in:
@@ -1461,7 +1461,7 @@ static LLConstant* expand_to_sarray(Type *base, Expression* exp)
|
||||
TypeSArray* tsa = static_cast<TypeSArray*>(t);
|
||||
dims.push_back(tsa->dim->toInteger());
|
||||
assert(t->nextOf());
|
||||
t = t->nextOf()->toBasetype();
|
||||
t = stripModifiers(t->nextOf()->toBasetype());
|
||||
}
|
||||
|
||||
size_t i = dims.size();
|
||||
@@ -1482,8 +1482,8 @@ static LLConstant* expand_to_sarray(Type *base, Expression* exp)
|
||||
LLConstant* DtoConstExpInit(Loc loc, Type* type, Expression* exp)
|
||||
{
|
||||
#if DMDV2
|
||||
Type* expbase = exp->type->toBasetype()->mutableOf()->merge();
|
||||
Type* base = type->toBasetype()->mutableOf()->merge();
|
||||
Type* expbase = stripModifiers(exp->type->toBasetype())->merge();
|
||||
Type* base = stripModifiers(type->toBasetype())->merge();
|
||||
#else
|
||||
Type* expbase = exp->type->toBasetype();
|
||||
Type* base = type->toBasetype();
|
||||
|
||||
Reference in New Issue
Block a user