[Issue 4734] New: immutable return type specifier without parantheses confuses the compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 26 14:15:39 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4734
Summary: immutable return type specifier without parantheses
confuses the compiler
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-08-26 14:15:31 PDT ---
import std.stdio;
class Test
{
immutable char foo()
{
return 'z';
}
}
unittest
{
auto test = new Test;
test.foo();
}
void main()
{
}
error:
test2.d(16): Error: function test2.Test.foo () immutable is not callable using
argument types ()
Note that using const instead of immutable works.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list