www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6863] New: Can upcast to Base from cosnt(Derived)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6863

           Summary: Can upcast to Base from cosnt(Derived)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: rayerd.wiz gmail.com


--- Comment #0 from Haruki Shigemori <rayerd.wiz gmail.com> 2011-10-30 00:38:10
PDT ---
// dmd 2.56

class Base {}

class Derived : Base {}

void main()
{
    Base x = new const(Derived); // accepts-invalid
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 30 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6863


Haruki Shigemori <rayerd.wiz gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Can upcast to Base from     |Can upcast to Base from
                   |cosnt(Derived)              |const(Derived)


--- Comment #1 from Haruki Shigemori <rayerd.wiz gmail.com> 2011-10-30 00:46:40
PDT ---
Fixed a summary typo.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 30 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6863


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE


--- Comment #2 from yebblies <yebblies gmail.com> 2011-12-13 16:23:28 EST ---
*** This issue has been marked as a duplicate of issue 3731 ***

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