[Issue 3180] Covariance of delegates/function pointers

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3180

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|unspecified |D2

--


[Issue 3180] Covariance of delegates/function pointers

2011-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
   Severity|normal  |critical

Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


--- Comment #12 from yebblies yebbl...@gmail.com 2011-09-06 02:02:19 PDT ---
Part was fixed by
https://github.com/D-Programming-Language/dmd/commit/dfb683f63ec89709b0bf2760ef3b2a249ce320eb

Raising importance as while not a regression, this fixes one. (bug 6352)

Pull for the remaining common type bugs:
https://github.com/D-Programming-Language/dmd/pull/368

--- Comment #13 from yebblies yebbl...@gmail.com 2011-09-06 02:03:45 PDT ---
Part was fixed by
https://github.com/D-Programming-Language/dmd/commit/dfb683f63ec89709b0bf2760ef3b2a249ce320eb

Raising importance as while not a regression, this fixes one. (bug 6352)

Pull for the remaining common type bugs:
https://github.com/D-Programming-Language/dmd/pull/368

--- Comment #14 from Walter Bright bugzi...@digitalmars.com 2011-09-16 
23:28:48 PDT ---
https://github.com/D-Programming-Language/dmd/commit/77bed134d06e6314c5b65465068f554b3f2c2e8d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180



--- Comment #15 from Haruki Shigemori rayerd@gmail.com 2011-09-17 
09:04:50 PDT ---
import std.stdio;

class Base  {}
class Derived : Base {}

class X
{
Base foo() { return new Base; }
}
class Y : X
{
Derived foo() { return new Derived; }
}

void main()
{
// Covariance is good
{
Base delegate() f = delegate Derived() { return new Derived; };
writefln(delegate convariance is %s, f().toString() == a.Derived
? OK : NG);
}{
static Derived fp() { return new Derived; }
Base function() f = fp;
writefln(function pointer covariance is %s, f().toString() ==
a.Derived ? OK : NG);
}

// Contravariance is BAD
{
auto c = new class { void foo(Base){} };

// GOOD
void delegate(Base) f = c.foo;
f(new Base);
f(new Derived);

// BAD
void delegate(Derived) g = c.foo;
g(new Derived);
}
}

a.d(33): Error: cannot implicitly convert expression (c.foo) of type void
delegate(Base) to void delegate(Derived)

---

Why is Status RESOLVED-FIXED?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180



--- Comment #16 from yebblies yebbl...@gmail.com 2011-09-18 12:17:32 EST ---
(In reply to comment #15)
 
 Why is Status RESOLVED-FIXED?

I assume you're asking why this report was marked as fixed when delegate
contravariance hasn't been implemented? See comment #6 and issue 3075, this is
covered by another report which has been rejected.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords|patch   |
 Status|RESOLVED|REOPENED
   Platform|Other   |All
 Resolution|FIXED   |
 OS/Version|Windows |All


--- Comment #10 from yebblies yebbl...@gmail.com 2011-09-06 18:12:49 EST ---
Partial is partial.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #11 from yebblies yebbl...@gmail.com 2011-09-06 18:49:34 EST ---
*** Issue 3267 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
   Severity|normal  |critical


--- Comment #12 from yebblies yebbl...@gmail.com 2011-09-06 19:02:19 EST ---
Part was fixed by
https://github.com/D-Programming-Language/dmd/commit/dfb683f63ec89709b0bf2760ef3b2a249ce320eb

Raising importance as while not a regression, this fixes one. (bug 6352)

Pull for the remaining common type bugs:
https://github.com/D-Programming-Language/dmd/pull/368

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
   Severity|normal  |critical


--- Comment #12 from yebblies yebbl...@gmail.com 2011-09-06 19:02:19 EST ---
Part was fixed by
https://github.com/D-Programming-Language/dmd/commit/dfb683f63ec89709b0bf2760ef3b2a249ce320eb

Raising importance as while not a regression, this fixes one. (bug 6352)

Pull for the remaining common type bugs:
https://github.com/D-Programming-Language/dmd/pull/368

--- Comment #13 from yebblies yebbl...@gmail.com 2011-09-06 19:03:45 EST ---
Part was fixed by
https://github.com/D-Programming-Language/dmd/commit/dfb683f63ec89709b0bf2760ef3b2a249ce320eb

Raising importance as while not a regression, this fixes one. (bug 6352)

Pull for the remaining common type bugs:
https://github.com/D-Programming-Language/dmd/pull/368

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-09-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #9 from Walter Bright bugzi...@digitalmars.com 2011-09-02 
02:38:23 PDT ---
Partial fix:
https://github.com/D-Programming-Language/dmd/commit/306df8eaa6f8a987f76f401a1e03d8edf1f1e2ae

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||bugzi...@kyllingen.net


--- Comment #8 from yebblies yebbl...@gmail.com 2011-08-19 01:50:28 EST ---
*** Issue 6524 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-06-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||zan77...@nifty.com


--- Comment #7 from yebblies yebbl...@gmail.com 2011-06-13 12:16:14 PDT ---
*** Issue 4218 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3180] Covariance of delegates/function pointers

2011-06-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3180


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords|spec|patch, rejects-valid
 CC||yebbl...@gmail.com
Summary|Need delegate covariance|Covariance of
   |and contravariance  |delegates/function pointers
   Severity|enhancement |normal


--- Comment #6 from yebblies yebbl...@gmail.com 2011-06-08 22:54:07 PDT ---
The enhancement portion of the original report is a dupe of Issue 3075, which
has been marked INVALID by Walter.

In the comments he states that delegate covariance is supposed to work, so that
part of the report is definitely a bug.

https://github.com/D-Programming-Language/dmd/pull/96 
should fix this report for function pointers.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---