Merge 2.058beta

This commit is contained in:
Alexey Prokhin
2012-02-12 14:42:37 +04:00
parent f2ed2e96b0
commit e74e55df89
64 changed files with 5261 additions and 2974 deletions

View File

@@ -193,6 +193,7 @@ Initializer *StructInitializer::semantic(Scope *sc, Type *t, int needInterpret)
errors = 1;
continue;
}
s = s->toAlias();
// Find out which field index it is
for (fieldi = 0; 1; fieldi++)
@@ -287,6 +288,7 @@ Expression *StructInitializer::toExpression()
error(loc, "'%s' is not a member of '%s'", id->toChars(), sd->toChars());
goto Lno;
}
s = s->toAlias();
// Find out which field index it is
for (fieldi = 0; 1; fieldi++)
@@ -863,6 +865,12 @@ L1:
Type *ExpInitializer::inferType(Scope *sc)
{
//printf("ExpInitializer::inferType() %s\n", toChars());
if (exp->op == TOKfunction && ((FuncExp *)exp)->td)
{
exp->error("cannot infer type from ambiguous function literal %s", exp->toChars());
return Type::terror;
}
exp = exp->semantic(sc);
exp = resolveProperties(sc, exp);