Thread overview
[Issue 7811] New: D2 beta outputs "not a property" error instead of real error on UFCS array template property
Apr 09, 2012
Kenji Hara
Apr 09, 2012
Walter Bright
April 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7811

           Summary: D2 beta outputs "not a property" error instead of real
                    error on UFCS array template property
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: schveiguy@yahoo.com


--- Comment #0 from Steven Schveighoffer <schveiguy@yahoo.com> 2012-04-02 09:21:28 PDT ---
Beta version for 2.059 release.

This code has an error in it:

void main()
{
    int[] x;
    assert(x.l == null);
}

@property immutable(T*) l(T)(T[] t)
{
    return t.ptr;
}

However, the error reported by dmd beta is:

Error: not a property x.l

If I remove @property:

void main()
{
    int[] x;
    assert(x.l() == null);
}

immutable(T*) l(T)(T[] t)
{
    return t.ptr;
}

I get the true error:

Error: cannot implicitly convert expression (cast(int*)t) of type int* to
immutable(int*)
Error: template instance l!(int) error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7811


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

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


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-04-09 06:40:42 PDT ---
https://github.com/D-Programming-Language/dmd/pull/870

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7811



--- Comment #2 from github-bugzilla@puremagic.com 2012-04-09 08:40:32 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/62fbecbc8d50c5a2508065e52b8da13d4c31e9b8
fix Issue 7811 - "not a property" error instead of real error on UFCS array
template property

https://github.com/D-Programming-Language/dmd/commit/d06e17dee97d9ce155a78e90373d3119f1679798 Merge pull request #870 from 9rnsr/fix7811

Issue 7811 - "not a property" error instead of real error on UFCS array template property

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7811


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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