Thread overview
[Issue 4205] New: Strange error message when trying to call unknown method on string
May 18, 2010
Lukasz Wrzosek
Oct 20, 2012
Andrej Mitrovic
Dec 29, 2012
Walter Bright
May 18, 2010
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


--- Comment #0 from Lukasz Wrzosek <luk.wrzosek@gmail.com> 2010-05-18 15:52:27 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: -------
October 20, 2012
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


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-10-20 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: -------
December 29, 2012
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: -------