"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dmd/typesem.d" between
dmd-2.097.0.tar.gz and dmd-2.097.1.tar.gz

About: DMD (Digital Mars D) is the D reference compiler. D is an object-oriented, imperative, multi-paradigm system programming language.

typesem.d  (dmd-2.097.0):typesem.d  (dmd-2.097.1)
skipping to change at line 4537 skipping to change at line 4537
Expression e = p.type.defaultInitLiteral(loc); Expression e = p.type.defaultInitLiteral(loc);
if (e.op == TOK.error) if (e.op == TOK.error)
{ {
return e; return e;
} }
(*exps)[i] = e; (*exps)[i] = e;
} }
return new TupleExp(loc, exps); return new TupleExp(loc, exps);
} }
Expression visitNoreturn(TypeNoreturn mt)
{
static if (LOGDEFAULTINIT)
{
printf("TypeNoreturn::defaultInit() '%s'\n", mt.toChars());
}
auto cond = IntegerExp.createBool(false);
auto msg = new StringExp(loc, "Accessed expression of type `noreturn`");
auto ae = new AssertExp(loc, cond, msg);
ae.type = mt;
return ae;
}
switch (mt.ty) switch (mt.ty)
{ {
case Tvector: return visitVector (cast(TypeVector)mt); case Tvector: return visitVector (cast(TypeVector)mt);
case Tsarray: return visitSArray (cast(TypeSArray)mt); case Tsarray: return visitSArray (cast(TypeSArray)mt);
case Tfunction: return visitFunction(cast(TypeFunction)mt); case Tfunction: return visitFunction(cast(TypeFunction)mt);
case Tstruct: return visitStruct (cast(TypeStruct)mt); case Tstruct: return visitStruct (cast(TypeStruct)mt);
case Tenum: return visitEnum (cast(TypeEnum)mt); case Tenum: return visitEnum (cast(TypeEnum)mt);
case Ttuple: return visitTuple (cast(TypeTuple)mt); case Ttuple: return visitTuple (cast(TypeTuple)mt);
case Tnull: return new NullExp(Loc.initial, Type.tnull); case Tnull: return new NullExp(Loc.initial, Type.tnull);
case Terror: return ErrorExp.get(); case Terror: return ErrorExp.get();
case Tarray: case Tarray:
case Taarray: case Taarray:
case Tpointer: case Tpointer:
case Treference: case Treference:
case Tdelegate: case Tdelegate:
case Tclass: return new NullExp(loc, mt); case Tclass: return new NullExp(loc, mt);
case Tnoreturn: return visitNoreturn(cast(TypeNoreturn) mt);
default: return mt.isTypeBasic() ? default: return mt.isTypeBasic() ?
visitBasic(cast(TypeBasic)mt) : visitBasic(cast(TypeBasic)mt) :
null; null;
} }
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)