Issue 1983 - Big Hole in Const System #71

Closed
wants to merge 14 commits into
from

Conversation

Projects
None yet
2 participants
@9rnsr
Member

9rnsr commented May 18, 2011

http://d.puremagic.com/issues/show_bug.cgi?id=1983
(This request is detab-ed version of #70)

This changes onto #72 . See it before merging.

Points of fixes:

  • DotVarExp resolve overloads by e1 type modifiers. When there is one exact match, it makes 'exact type'. Two or more matches exists but one match is better than others, make 'better type'. When matches are ambiguous (There are exact/const conversion matches each other), make 'ambiguous type'. Others make 'no match'.
  • Against 'ambiguous type', is(typeof(...)) idiom is still valid. But ambiguous type itself makes compile error. Implicit/explicit casting against ambiguous type expression resolves its overloads.
  • Keep symbols resolved overloads (by __traits(getOverloads, ...) and extract with index) through template alias/tuple parameters.

Supplemental changes of Phobos:
See D-Programming-Language/phobos#78

Thanks.

@9rnsr 9rnsr closed this Jun 1, 2011

@9rnsr 9rnsr reopened this Jun 5, 2011

@9rnsr

This comment has been minimized.

Show comment Hide comment
@9rnsr

9rnsr Jun 5, 2011

Member

Improve changes, and phobos build & dmd/phobos test suites are now ok.

Member

9rnsr commented Jun 5, 2011

Improve changes, and phobos build & dmd/phobos test suites are now ok.

@Trass3r

This comment has been minimized.

Show comment Hide comment
@Trass3r

Trass3r Sep 26, 2011

What if static opCall is used for something other than construction?

What if static opCall is used for something other than construction?

This comment has been minimized.

Show comment Hide comment
@9rnsr

9rnsr Sep 27, 2011

Owner

If you use call expression with type (T(...)), and the T has both constructor and static opCall, then constructor is always preferred.
If you want to use static opCall, you should not define any constructors.

Owner

9rnsr replied Sep 27, 2011

If you use call expression with type (T(...)), and the T has both constructor and static opCall, then constructor is always preferred.
If you want to use static opCall, you should not define any constructors.

This comment has been minimized.

Show comment Hide comment
@Trass3r

Trass3r Sep 27, 2011

Good point. I think having both static opCall and constructors should be a compiler error then.

Good point. I think having both static opCall and constructors should be a compiler error then.

@9rnsr

This comment has been minimized.

Show comment Hide comment
@9rnsr

9rnsr Oct 14, 2011

Member

I found an issue around ambiguous function type.
I have closed this request temporarily.

Member

9rnsr commented Oct 14, 2011

I found an issue around ambiguous function type.
I have closed this request temporarily.

@9rnsr 9rnsr closed this Oct 14, 2011

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