Commit e62b9f8e by Iain Buclaw

re PR d/90660 (ICE in TypeQualified::resolveHelper, at d/dmd/mtype.c:6738)

	PR d/90660
d/dmd: Merge upstream dmd bbc5ea66a

Fixes segmentation fault in TypeQualified::resolveHelper.

Reviewed-on: https://github.com/dlang/dmd/pull/10000

From-SVN: r272339
parent f45ce17d
423758078f8fcd945815a5294806915a8a01d392
bbc5ea66ab41ebd14abd9a0fbb9ca6ef6b2dcb14
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
......@@ -6734,6 +6734,10 @@ void TypeQualified::resolveHelper(Loc loc, Scope *sc,
goto L3;
if (VarDeclaration *v = s->isVarDeclaration())
{
// https://issues.dlang.org/show_bug.cgi?id=19913
// v->type would be null if it is a forward referenced member.
if (v->type == NULL)
v->semantic(sc);
if (v->storage_class & (STCconst | STCimmutable | STCmanifest) ||
v->type->isConst() || v->type->isImmutable())
{
......
/* PERMUTE_ARGS:
* TEST_OUTPUT:
---
fail_compilation/fail19913.d(11): Error: no property `b` for type `int`
fail_compilation/fail19913.d(11): Error: mixin `fail19913.S.b!()` is not defined
---
*/
struct S
{
mixin a.b;
enum { a }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment