Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Isue 4424 & 6216 Relax opAssign signature #166

Merged
merged 5 commits into from over 1 year ago

6 participants

Hara Kenji Cristi Cobzarenco Masahiro Nakagawa Daniel Murphy David Nadlinger Damian Ziemba
Hara Kenji
Collaborator
9rnsr commented June 26, 2011
This change is based on #94 (already merged).

Issue 4424 - Copy constructor and templated opAssign cannot coexist
Issue 6174 - Initialize const fixed-size array in constructor
Issue 6216 - Built-in opAssign implicitly defined should call field's opAssign
Issue 6336 - Can't return ref T where T has const/immutable members

Following is removed from this pull request:
Issue 4596 - [tdpl] Rebinding this in class method compiles

Cristi Cobzarenco

I would be really interested in this request going through as Issue 4424 seriously affects the interface of my GSoC project.

Hara Kenji
Collaborator

I would be really interested in this request going through as Issue 4424 seriously affects the interface of my GSoC project.

A workaround exists against Issue 4424 like follows:

struct X {
    private mixin template _workaround4424()
    {
        @disable void opAssign(typeof(this) );
    }
    mixin _workaround4424;

    void opAssign(R)(R rhs) { /*...*/ }
}

It is already used std.typecons.Tuple.

Brad Roberts braddr referenced this pull request from a commit September 14, 2011
Commit has since been removed from the repository and is no longer available.
Hara Kenji 9rnsr closed this November 04, 2011
Hara Kenji 9rnsr reopened this November 06, 2011
Hara Kenji
Collaborator

Update patch.
This additionaly fix issue 6174.

Hara Kenji
Collaborator

Updated to fix 4596.

Masahiro Nakagawa

I hit this issue in msgpack-d today.
I removed 'immutable' keyword from member variables for avoiding compilation error.

This patch is needed for correct implementation.

Hara Kenji
Collaborator

This pull also contains a fix for bug 6336.
Sorry, I had completely forgotten to post/find an issue about that problem in bugzilla.

Daniel Murphy
Collaborator

Would it be possible to break this up a bit to make it easier to review and merge?

David Nadlinger
Collaborator

@yebblies: As far as I can see, the pull request is already broken up into atomic commits?!

Damian Ziemba

After excluding unittests this pull isn't THAT big, but still I think @yebblies is right here.
1 bug - 1 pull request would be easier to review for folks even if Pull request is divided into atomic commits.

Daniel Murphy
Collaborator

@klickverbot It's easier if I can review once bugfix at a time. Is each commit completely independent of the others? If so, it will be fairly easy to split them into multiple pull requests. If not I'll need to work out how they are related before I can be confident enough to pull them.

added some commits May 26, 2012
Relax opAssign signature.
Class type that has identity opAssign is disallowed both it is templated or not.
9ee798f
fix Issue 6216 - Built-in opAssign implicitly defined should call fie…
…ld's opAssign

Separate 'top assignable' (see opAssign first) from 'blit assignable' (memberwise), and now they are not related to 'modifiable' directly.
b9896d1
fix issue 4424 - Copy constructor and templated opAssign cannot coexist 959e2f0
fix Issue 6336 - Can't return ref T where T has const/immutable members
Remove fail7695.d, because it was incorrectly failed to compile by bug 6336.
b10781e
fix Issue 6174 - Initialize const fixed-size array in constructor
Improve checking of whether an expression is modifiable.
If an expression is *initializing*, that is part of construction, then it bypass type check.
9553d0c
Hara Kenji
Collaborator

Later commits depends on early ones, and all of them are related to the assignable language semantics.
OK. The commits for 6174 and 4596 are additional changes, so we don't need merge them at once. I'll remove the additionals from this pull request.

Hara Kenji
Collaborator

Updated.

Daniel Murphy
Collaborator

This seems to be causing some failures in std.container

Hara Kenji
Collaborator

The error in std.container is fixed by the change for 6174...
Unfortunately, I can not break up the changes, except for 4596.

Daniel Murphy
Collaborator

Fair enough.

Daniel Murphy yebblies merged commit 5b42e51 into from October 07, 2012
Daniel Murphy yebblies closed this October 07, 2012
Hara Kenji
Collaborator

I opened #1169 for issue 4596.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 5 unique commits by 1 author.

Oct 07, 2012
Relax opAssign signature.
Class type that has identity opAssign is disallowed both it is templated or not.
9ee798f
fix Issue 6216 - Built-in opAssign implicitly defined should call fie…
…ld's opAssign

Separate 'top assignable' (see opAssign first) from 'blit assignable' (memberwise), and now they are not related to 'modifiable' directly.
b9896d1
fix issue 4424 - Copy constructor and templated opAssign cannot coexist 959e2f0
fix Issue 6336 - Can't return ref T where T has const/immutable members
Remove fail7695.d, because it was incorrectly failed to compile by bug 6336.
b10781e
fix Issue 6174 - Initialize const fixed-size array in constructor
Improve checking of whether an expression is modifiable.
If an expression is *initializing*, that is part of construction, then it bypass type check.
9553d0c
Something went wrong with that request. Please try again.