www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12016] New: implicit immutable upcast becomes null in CTFE

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

           Summary: implicit immutable upcast becomes null in CTFE
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow gmail.com> 2014-01-28
08:33:46 EET ---
/////////////////////////////////
class Base { }

class Sub : Base { }

int f(immutable Base c)
{
    assert(c);
    return 1;
}

enum i = f(new immutable Sub);
/////////////////////////////////

The assert fails in DMD git but not 2.064.2.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 27 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12016



--- Comment #1 from Vladimir Panteleev <thecybershadow gmail.com> 2014-01-28
08:57:08 EET ---
Regression introduced by
https://github.com/D-Programming-Language/dmd/pull/2749

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 27 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12016


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2014-01-27 23:39:29 PST ---
https://github.com/D-Programming-Language/dmd/pull/3168

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 27 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12016



--- Comment #3 from github-bugzilla puremagic.com 2014-01-28 00:24:00 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0da9cbc205f860b9e46805f27f4400a4f1e101bf
fix Issue 12016 - implicit immutable upcast becomes null in CTFE

https://github.com/D-Programming-Language/dmd/commit/ce84f0b953027595cd570d0af0e1ab4c27473297
Merge pull request #3168 from 9rnsr/fix12016

[REG2.065a] Issue 12016 - implicit immutable upcast becomes null in CTFE

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 28 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12016


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 28 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12016



--- Comment #4 from github-bugzilla puremagic.com 2014-02-01 04:50:42 PST ---
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1ace7e9e1070732f430baa38b19e5462e64d6eec
Merge pull request #3168 from 9rnsr/fix12016

[REG2.065a] Issue 12016 - implicit immutable upcast becomes null in CTFE

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