www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11822] New: `-de` switch causees ICE with `auto` return and other stuff

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

           Summary: `-de` switch causees ICE with `auto` return and other
                    stuff
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-12-26
16:19:22 MSK ---
This code should be rejected to compile with `-de` switch:
---
struct S(alias pred)
{
    this(int) { pred(1); }
    void f()  { pred(1); }
}

auto g(alias pred)()
{ return S!pred(1); }

deprecated bool d(int)
{ return true; }

auto h()
{
    int i;
    return g!(n => d(i))();
}
---
main.d(16): Deprecation: function main.d is deprecated
main.d(8):        instantiated from here: S!(__lambda1)
main.d(16):        instantiated from here: g!((n) => d(i))
main.d(16): Error: template instance main.h.g!((n) => d(i)) error instantiating
Assertion failure: 'type->ty == Tfunction' on line 3178 in file 'func.c'
---

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11822


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
           Severity|normal                      |regression


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-12-26 05:42:08 PST ---
https://github.com/D-Programming-Language/dmd/pull/3034

This is a regression in 2.065alpha.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11822



--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2014-01-02 20:37:32 PST ---
*** Issue 11857 has been marked as a duplicate of this issue. ***

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2014-01-11
13:22:50 PST ---
https://github.com/D-Programming-Language/dmd/pull/3081

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



--- Comment #4 from github-bugzilla puremagic.com 2014-01-12 17:20:30 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/73b477b46be16c8896c5306027577f6ddbdd26ce
fix Issue 11822 -  switch causees ICE with  return and other stuff

https://github.com/D-Programming-Language/dmd/commit/24c1dff4856983533e813b89c1d8adf9492936d0
Merge pull request #3081 from WalterBright/fix11822

fix Issue 11822 -  switch causes ICE with  return and other stuff

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


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 12 2014