[Issue 4539] Refuse assignment to string literal

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 29 14:36:05 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4539



--- Comment #17 from bearophile_hugs at eml.cc 2012-01-29 14:36:02 PST ---
With the latest DMD2.058head this code:


void foo(immutable ref string) {}
void main() {
    foo("hello");
}


Gives:

test.d(3): Error: function test.foo (ref immutable(char[]) _param_0) is not
callable using argument types (string)

Is this expected?

(Also note the function signature is (ref immutable(char[]) _param_0) while I
have specified an immutable ref).

-- 
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