Skip to content

Issue 6578 - Wrong type deduction for NewExp and __ctor with struct#666

Merged
9rnsr merged 1 commit intodlang:masterfrom
yebblies:issue6578
Mar 6, 2013
Merged

Issue 6578 - Wrong type deduction for NewExp and __ctor with struct#666
9rnsr merged 1 commit intodlang:masterfrom
yebblies:issue6578

Conversation

@yebblies
Copy link
Contributor

For NewExp, the type is incorrectly being set to the constructor's return type.
Same thing for constructor calls.

http://d.puremagic.com/issues/show_bug.cgi?id=6578

@Trass3r
Copy link
Contributor

Trass3r commented Mar 21, 2012

building dmd fails.

@yebblies
Copy link
Contributor Author

I know.

@yebblies
Copy link
Contributor Author

Update.

@andralex
Copy link
Member

Merge conflict, please rebase. Thanks!

braddr pushed a commit to braddr/dmd that referenced this pull request Oct 22, 2012
Make std.math compile on non-x86 by stubbing/asserting things out.
@acehreli
Copy link

acehreli commented Mar 5, 2013

I hope we can get this in soon. One of the DConf talks depends on being able to construct immutable struct objects.

@9rnsr
Copy link
Contributor

9rnsr commented Mar 6, 2013

I think that this is not good patch. I never argue that hackish itself is a problem, but this hack does not move things toward correct direction.

@yebblies
Copy link
Contributor Author

yebblies commented Mar 6, 2013

I don't see how this is a hack. That said, I do think it's a bad patch, because it tried to change the parameter from an expression to a type, which is unneeded and should not be mixed in with this patch.

Add the constructor's modifiers to the result type, instead of replacing them.
@yebblies
Copy link
Contributor Author

yebblies commented Mar 6, 2013

Updated.

@donc
Copy link
Collaborator

donc commented Mar 6, 2013

LGTM. Kenji, do you still think there's a problem with this?

@9rnsr
Copy link
Contributor

9rnsr commented Mar 6, 2013

OK, LGTM, too.

9rnsr added a commit that referenced this pull request Mar 6, 2013
Issue 6578 - Wrong type deduction for NewExp and __ctor with struct
@9rnsr 9rnsr merged commit a319e6d into dlang:master Mar 6, 2013
@yebblies
Copy link
Contributor Author

yebblies commented Mar 6, 2013

Thanks guys.

@yebblies yebblies deleted the issue6578 branch November 22, 2013 08:42
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.

6 participants