Skip to content

Conversation

hpohl
Copy link
Contributor

@hpohl hpohl commented May 27, 2013

andralex added a commit that referenced this pull request May 27, 2013
fix issue 10186 - default construction is disabled even if default ctor declared
@andralex andralex merged commit 81b5d09 into dlang:master May 27, 2013
@@ -1208,8 +1208,9 @@ void VarDeclaration::semantic(Scope *sc)
{
storage_class |= STCfield;
#if DMDV2
if (tbn->ty == Tstruct && ((TypeStruct *)tbn)->sym->noDefaultCtor ||
tbn->ty == Tclass && ((TypeClass *)tbn)->sym->noDefaultCtor)
if (!aad->defaultCtor &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking aad->defaultCtor in here is not good. because it is NULL until filled in CtorDeclaration::semantic.
I posted another test case which doesn't work still.

@hpohl
Copy link
Contributor Author

hpohl commented May 28, 2013

As you can see, I'm still learning. Opened new pull request: #2090.

@9rnsr 9rnsr mentioned this pull request Jun 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants