www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12261] New: regression(2.065): alias T cannot bind to templated type

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

           Summary: regression(2.065): alias T cannot bind to templated
                    type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timothee.cour2 gmail.com



22:52:00 PST ---
struct A1(T){}
template isAliasable(alias T)
{
  enum isAliasable=true;
}
template isAliasable(T)
{
  enum isAliasable=false;
}
void main(){
  alias foo=A1!double; //this works
  static assert(isAliasable!(A1!double)); //ok in 2.064.2; CT error in 2.065
even though previous line ok

}

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


Timothee Cour <timothee.cour2 gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2 gmail.com



22:56:58 PST ---
Actually this also fails with:
struct A2{}
static assert(isAliasable!(A2)); //ok in 2.064.2; CT error in 2.065

Is that a bugfix or a bug?

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


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com
            Summary|regression(2.065): alias T  |[REG2.066a] alias T cannot
                   |cannot bind to templated    |bind to templated type
                   |type                        |



09:52:29 EET ---
This only manifests in git, not the released 2.065, right?

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




10:08:45 EET ---
Introduced in https://github.com/D-Programming-Language/dmd/pull/3210.

Looking at that pull's testcases, this might be an intentional change - (T) is
more specialized than (alias T), as all types can be aliases but not all
aliases are types.

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





 Introduced in https://github.com/D-Programming-Language/dmd/pull/3210.
 
 Looking at that pull's testcases, this might be an intentional change - (T) is
 more specialized than (alias T), as all types can be aliases but not all
 aliases are types.
Yes, the current behavior has practical benefit that: template isAliasable(alias T) { pragma(msg, T); } template isAliasable(T) { pragma(msg, T); } struct A1(T) {} struct A2{} alias a1 = isAliasable!(const A1!double); alias a2 = isAliasable!(const A2); With 2.065: A1!double A2 --> type qualifier information has lost With 2.066a: const(A1!double) const(A2) --> accessible to the full information -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 26 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12261


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

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



Marked as invalid.

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