mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 14:10:30 +03:00
Fixes Issue 9336 - Format should work on shared address.
This commit is contained in:
parent
ca65b3701a
commit
b22a90eb9e
1 changed files with 7 additions and 1 deletions
|
@ -2842,7 +2842,7 @@ if (isPointer!T && !is(T == enum) && !hasToString!(T, Char))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const void * p = val;
|
const p = val;
|
||||||
if (f.spec == 's')
|
if (f.spec == 's')
|
||||||
{
|
{
|
||||||
FormatSpec!Char fs = f; // fs is copy for change its values.
|
FormatSpec!Char fs = f; // fs is copy for change its values.
|
||||||
|
@ -2899,6 +2899,12 @@ unittest
|
||||||
formatTest( B.init, "null" );
|
formatTest( B.init, "null" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
// Test for issue 9336
|
||||||
|
shared int i;
|
||||||
|
format("%s", &i);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Delegates are formatted by 'Attributes ReturnType delegate(Parameters)'
|
Delegates are formatted by 'Attributes ReturnType delegate(Parameters)'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue