Skip to content

Comments

Issue 1983 - Delegates violate const#2130

Closed
9rnsr wants to merge 6 commits intodlang:masterfrom
9rnsr:fix1983
Closed

Issue 1983 - Delegates violate const#2130
9rnsr wants to merge 6 commits intodlang:masterfrom
9rnsr:fix1983

Conversation

@9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jun 4, 2013

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

Depends on #2125, #2123, and dlang/phobos#1331.

  1. Add ambiguous type to represent the type which comes from overloaded symbol.
  2. Carry overload information properly, and use it.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 4, 2013

Add fix for Issue 7322 - Taking address of deprecated functions isn't refused

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 26, 2013

Bug 1083 1983 is a remaining big hole in type-system. Fixing it has a high priority toward finalization of D2 compiler implementation.
And, this PR will become a basis for other overloaded-symbol related language specifications those are yet not well defined (template overload set merging, access check for symbols through template alias parameter, etc).
Please review this...

@ghost
Copy link

ghost commented Jul 26, 2013

Are you really talking about bug 1083? By the way, the are several others issues related to 1983:
http://d.puremagic.com/issues/show_bug.cgi?id=8781
http://d.puremagic.com/issues/show_bug.cgi?id=9149
and at least another two, but cannot find them now.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 26, 2013

Sorry, I'm talking about bug 1983.
Issue 8781 is a dup of 1983.
And AFAIK, issue 9149 is not a bug. D2 type system cannot reject the code filed in it.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jan 31, 2014

Updated.

@9rnsr
Copy link
Contributor Author

9rnsr commented Apr 16, 2014

Updated for the issues:

Issue 7549 - typeof of overloaded function picks the lexically first one
Issue 8868 - overload resolution of &x.g() incorrectly chooses delegate over function pointer
Issue 9027 - Getting address of overloaded function using cast selects the lexically first one if there is no match

@quickfur
Copy link
Member

quickfur commented Aug 6, 2014

ping
The supplementary Phobos pull has been merged a year ago. What's holding up this PR?

@andralex
Copy link
Member

ping @WalterBright @yebblies @MartinNowak please review

@9rnsr
Copy link
Contributor Author

9rnsr commented Jan 27, 2015

During two years, I'm repeatedly rebasing this PR to keep mergeable. Type system bug is much higher priority than other any enhancement features.

I hope to other committers to be prefer fixing essential language bugs than cosmetic syntax changes.

@9rnsr
Copy link
Contributor Author

9rnsr commented Feb 21, 2015

Ping.

@quickfur
Copy link
Member

This has been a bug for 7 years. Is this ever going to get fixed?!

@yebblies
Copy link
Contributor

Right after bug 314.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 14, 2016

Oh, didn't see that there. :-)

src/mtype.d Outdated
e = DsymbolExp.resolve(loc, sc, s, false); // todo
else
e = new VarExp(loc, s.isDeclaration());
e = new VarExp(loc, s.isDeclaration(), false); // todo
Copy link
Member

Choose a reason for hiding this comment

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

TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tested a new better fix for VarExp.hasOverloads and others' setting. Now it's changed to give true, and the commit is properly in #5198.

@Geod24
Copy link
Member

Geod24 commented Sep 6, 2018

Since @9rnsr has sadly disappeared from the D scene, I'm going to send this to the Phantom Zone.
One reason to do so is that our queue of PR has grown quite large, and this is still being scheduled from time to time (e.g. see the auto-tester).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants