www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4205] New: Strange error message when trying to call unknown method on string

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

           Summary: Strange error message when trying to call unknown
                    method on string
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: luk.wrzosek gmail.com



PDT ---
//============================= 
module fooo;

class C
{
}

void main(string[] args)
{
    int i = 10;
    string str = "123";
    C c = new C;

    i.toHash();      //tmp.d(13): Error: no property 'toHash' for type 'int'
    i.someFunc();    //tmp.d(14): Error: no property 'someFunc' for type 'int'

    c.toHash();
    c.someFunc();    //tmp.d(17): Error: no property 'someFunc' for type
'fooo.C'

    str.toHash();    //tmp.d(19): Error: undefined identifier module
fooo.toHash
    str.someFunc();  //tmp.d(20): Error: undefined identifier module
fooo.someFunc
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4205


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

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



10:30:33 PDT ---
These are now:

test.d(11): Error: undefined identifier 'toHash'
test.d(12): Error: undefined identifier 'someFunc'
test.d(15): Error: undefined identifier 'someFunc'
test.d(17): Error: undefined identifier 'toHash'
test.d(18): Error: undefined identifier 'someFunc'

Which is one step forward and one step back. I'd prefer 'Error: no property
'toHash' for type 'int'', but I guess the new error is due to UFCS support.
Still the 'module' stuff is gone, so marking fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 20 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4205


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
            Version|unspecified                 |D2
         Resolution|FIXED                       |WORKSFORME


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