mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03: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:
parent
8987f2da30
commit
16847dd5d5
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue