Mercurial > projects > ldc
comparison dmd2/init.c @ 1452:638d16625da2
LDC 2 compiles again.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 30 May 2009 17:23:32 +0100 |
parents | 356e65836fb5 |
children | 54b3c1394d62 |
comparison
equal
deleted
inserted
replaced
1423:42bd767ec5a4 | 1452:638d16625da2 |
---|---|
1 | 1 |
2 // Compiler implementation of the D programming language | 2 // Compiler implementation of the D programming language |
3 // Copyright (c) 1999-2007 by Digital Mars | 3 // Copyright (c) 1999-2009 by Digital Mars |
4 // All Rights Reserved | 4 // All Rights Reserved |
5 // written by Walter Bright | 5 // written by Walter Bright |
6 // http://www.digitalmars.com | 6 // http://www.digitalmars.com |
7 // License for redistribution is by either the Artistic License | 7 // License for redistribution is by either the Artistic License |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | 8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
577 if (se->hasOverloads && !se->var->isFuncDeclaration()->isUnique()) | 577 if (se->hasOverloads && !se->var->isFuncDeclaration()->isUnique()) |
578 exp->error("cannot infer type from overloaded function symbol %s", exp->toChars()); | 578 exp->error("cannot infer type from overloaded function symbol %s", exp->toChars()); |
579 } | 579 } |
580 | 580 |
581 Type *t = exp->type; | 581 Type *t = exp->type; |
582 if (!t) | |
583 t = Initializer::inferType(sc); | |
582 return t; | 584 return t; |
583 //return t->ty == Tsarray ? t : t->toHeadMutable(); | |
584 } | 585 } |
585 | 586 |
586 Expression *ExpInitializer::toExpression() | 587 Expression *ExpInitializer::toExpression() |
587 { | 588 { |
588 return exp; | 589 return exp; |