www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10089] New: Strange function call error message with specified module

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

           Summary: Strange function call error message with specified
                    module
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-05-15 09:51:52 PDT ---
import std.stdio, std.range;
void main() {
    std.string.chunks("abcdef", 2);
}


Gives the error messages:

test.d(3): Error: std.stdio.chunks at
...\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(2270) conflicts with
std.range.chunks(Source)(Source source, size_t chunkSize) at
...\dmd2\windows\bin\..\..\src\phobos\std\range.d(6520)
test.d(3): Error: constructor std.stdio.chunks.this (File f, uint size) is not
callable using argument types (void)


Expected error messages should say that there is no std.string.chunks.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86                         |All
         OS/Version|Windows                     |All
           Severity|normal                      |regression


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-05-15 21:33:27 PDT ---
This is a regression in 2.063a, caused by the fix for UFCS name lookup.

With 2.062:
test.d(3): Error: undefined identifier 'chunks', did you mean 'template
chunks(Source)(Source source, size_t chunkSize)'?

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


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

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


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-05-15 21:34:48 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2040

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



--- Comment #3 from github-bugzilla puremagic.com 2013-05-17 12:59:09 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/fc314c322eb3bfbb00ce8b24f4a628c7220309f7
fix Issue 10089 - Strange function call error message with specified module

https://github.com/D-Programming-Language/dmd/commit/68385f234e07d31698f713493fe211c288322433
Merge pull request #2040 from 9rnsr/fix10089

[REG2.063a] Issue 10089 - Strange function call error message with specified
module

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



--- Comment #4 from github-bugzilla puremagic.com 2013-05-17 13:01:55 PDT ---
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/40c00264079cbacc58f63703da1a02abb6a57b4d
Merge pull request #2040 from 9rnsr/fix10089

[REG2.063a] Issue 10089 - Strange function call error message with specified
module

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


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: -------
May 17 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10089



--- Comment #5 from bearophile_hugs eml.cc 2013-05-17 15:42:15 PDT ---
(In reply to comment #2)
 https://github.com/D-Programming-Language/dmd/pull/2040
Thank you for the fix. Now the original program: import std.stdio, std.range; void main() { std.string.chunks("abcdef", 2); } Gives the error message: temp.d(3): Error: undefined identifier 'chunks', did you mean 'template chunks(Source)(Source source, size_t chunkSize)'? It's essentially saying: "undefined identifier 'chunks', did you mean 'chunks'?" Why is the error message not showing the name "std.string"? Maybe both 'chunks' should be module-qualified. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2013