[Issue 14925] New: replaceInPlace fail compilation
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 16 01:49:06 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14925
Issue ID: 14925
Summary: replaceInPlace fail compilation
Product: D
Version: D2
Hardware: x86
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: tsalm at free.fr
This code won't compile
import std.array;
import std.stdio;
void main()
{
char[] a = "mon texte 1".dup;
char[] b = "abc".dup;
size_t x = 4;
size_t y = 9;
replaceInPlace( a, x , y, b );
writeln( a );
}
Compilation fail with error :
replaceInPlace.d(11): Error: std.array.replaceInPlace called with argument
types (char[], uint, uint, char[]) matches both:
/usr/include/dmd/phobos/std/array.d(2279): std.array.replaceInPlace!(char,
char[]).replaceInPlace(ref char[] array, uint from, uint to, char[] stuff)
and:
/usr/include/dmd/phobos/std/array.d(2312): std.array.replaceInPlace!(char,
char[]).replaceInPlace(ref char[] array, uint from, uint to, char[] stuff)
Tested on DMD32 D Compiler v2.068.0-rc1
--
More information about the Digitalmars-d-bugs
mailing list