mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
Don't use TypeFunction::funcdecl as it is about to be removed
This commit is contained in:
parent
b819975c84
commit
8fea7484fe
3 changed files with 6 additions and 28 deletions
|
@ -166,28 +166,6 @@ IrTypePointer* IrTypePointer::get(Type* dt)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dt->nextOf()->ty == Tfunction)
|
||||
{
|
||||
TypeFunction* tf = static_cast<TypeFunction*>(dt->nextOf());
|
||||
if (tf->funcdecl)
|
||||
{
|
||||
if (FuncLiteralDeclaration* fld =
|
||||
tf->funcdecl->isFuncLiteralDeclaration())
|
||||
{
|
||||
if (fld->tok == TOKreserved)
|
||||
{
|
||||
// This is the type of a lambda that was inferred to be
|
||||
// a function literal instead of a delegate, so set tok
|
||||
// here in order to get correct types/mangling. Horrible
|
||||
// hack, but DMD does the same thing in FuncExp::toElem
|
||||
// and other random places.
|
||||
fld->tok = TOKfunction;
|
||||
fld->vthis = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elemType = i1ToI8(voidToI8(DtoType(dt->nextOf())));
|
||||
|
||||
// DtoType could have already created the same type, e.g. for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue