www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12392] New: No attribute inference if first template instantiation uses `alias`

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

           Summary: No attribute inference if first template instantiation
                    uses `alias`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2014-03-17
19:08:38 MSK ---
This code should compile:
---
void f(T)() { }
alias fa = f;

void main() nothrow
{ fa!int(); }
---
main.d(5): Error: 'main.fa!int.f' is not nothrow
main.d(4): Error: function 'D main' is nothrow yet may throw
---

Same errors for ` safe` and `pure` attributes.

This is major as the behaviour is completely unexpected as e.g.
`__traits(compiles, fa!int)` before `f!int()` call changes `f`'s signature.

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


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

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


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-03-17 08:47:26 PDT ---
https://github.com/D-Programming-Language/dmd/pull/3386

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



--- Comment #2 from github-bugzilla puremagic.com 2014-03-17 13:47:10 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b2d7d57db9a8fa1a4a8ccd8e0858d3ddce0feabd
fix Issue 12392 - No attribute inference if first template instantiation uses
`alias`

https://github.com/D-Programming-Language/dmd/commit/a2dee1195f94c0f3e78752c7352c569f65c2be8e
Merge pull request #3386 from 9rnsr/fix12392

Issue 12392 - No attribute inference if first template instantiation uses
`alias`

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


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |FIXED


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