[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #12 from github-bugzi...@puremagic.com 2012-07-08 14:03:31 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/b7bdcdce294729e48b56fa5d8feca5aa9a8cc253
Revert Merge pull request #92 from shoo/fix7020

This reverts commit 29f33bfdc0d36484e77ae8f369656720319f22e3, reversing
changes made to f11dd3e56476f75804809ecc14da2e65de3f335e.

fixes Issue 7375

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-30 
01:20:02 PST ---
The failure definitely happened between 2.056 and 2.057. Anyone care to run the
git binary diff thing?

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-30 
02:02:19 PST ---
Auch, I found it. In druntime/src/rt/cast_.d, the addition of a name compare
saying the classes are the same in _d_isbaseof and _d_isbaseof2.

Not sure what the right fix is.

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-01-30 
02:04:29 PST ---
The culprit:

https://github.com/D-Programming-Language/druntime/commit/5d21d47b5adda97759d15ec0139c0d5fac646971

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com


--- Comment #6 from yebblies yebbl...@gmail.com 2012-01-31 03:14:09 EST ---
I suspected is was that commit. (I remember seeing it when it was committed) 
Sorry I didn't get around to looking into it earlier.

I think the solution is to do a compare on the full mangled name of the class,
but  I can't see anywhere it's exposed in the classinfo so it would need to be
added.

This should probably be delayed until after the release and the commit
reverted.

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375


d...@dawgfoto.de changed:

   What|Removed |Added

 CC||d...@dawgfoto.de


--- Comment #7 from d...@dawgfoto.de 2012-01-30 09:39:05 PST ---
This was introduced by pull #92
https://github.com/D-Programming-Language/druntime/commits/29f33bfdc0d36484e77ae8f369656720319f22e3.

This added classinfo.name comparison while searching base classes.

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #8 from d...@dawgfoto.de 2012-01-30 10:01:25 PST ---
https://github.com/D-Programming-Language/druntime/pull/142

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #9 from github-bugzi...@puremagic.com 2012-01-30 11:12:29 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3a6c3629f3185c2d65354d1f04c500eb737d49d9
fix Issue 7375 - Regression(2.057): Invalid downcast permitted with
derived/aliased template classes

https://github.com/D-Programming-Language/dmd/commit/667ff95c935bc1cf743517b69d2dc421e43f9a51
fix Issue 7375 - Regression(2.057): Invalid downcast permitted with
derived/aliased template classes

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #10 from github-bugzi...@puremagic.com 2012-01-30 11:12:36 PST ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/06a33d14f9ad137d86309d40180ca0e60f4edb74
fix Issue 7375 - Regression(2.057): Invalid downcast permitted with
derived/aliased template classes

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #11 from Walter Bright bugzi...@digitalmars.com 2012-01-30 
11:17:53 PST ---
I fixed this in the compiler, not the runtime.

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-29 
22:16:19 PST ---
A one file version:
---
class A {}
class B(int i) : A {}
class C(int i) : B!i {}

template DerivedAlias(int i)
{
alias B!i DerivedAlias;
}

alias DerivedAlias!22 X;

void main(string[] args)
{
A foo = new C!11();
//auto dummy = cast(B!11)foo;
assert(cast(B!22)foo is null);
}

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


[Issue 7375] Regression(2.057): Invalid downcast permitted with derived/aliased template classes

2012-01-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7375



--- Comment #1 from Nick Sabalausky cbkbbej...@mailinator.com 2012-01-27 
00:26:47 PST ---
Sorry, I forgot to finish minimizing b.d. The properly minimized b.d is:


module b;

Base getEleven()
{
Base foo = new MoreDerived!11();
return foo;
}

class Base {}
class Derived(int i) : Base {}
class MoreDerived(int i) : Derived!i {}

template DerivedAlias(int i)
{
alias Derived!i DerivedAlias;
}


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