is it bug?

drug drug2004 at bk.ru
Tue Sep 26 12:44:36 UTC 2017


26.09.2017 15:16, Steven Schveighoffer пишет:
> 
> Yes, that is the bug, as I said at the end of my message. But you had 
> confused the issue by showing that "hey bar.foo isn't null!" which had 
> nothing to do with the bug. It wasn't null, and wasn't improperly being 
> treated as null. You don't need Bar at all to show the issue.
I see. It just was not-enough-reduced reduced case)
> 
>> And I guess that std.format process char-based types in different 
>> manner than others so we have working int, float etc arrays and 
>> failing char-based types (string, wstring, char[], static char[] and 
>> so on)
> 
> It's not that simple:
> 
> Nullable!(char[]) x;
> writeln(x); // Nullable.null;
> static struct Foo { Nullable!(char[]) x; }
> Foo foo;
> writeln(foo); // error
> 
> So in one context, printing a nullable char[] works exactly as expected. 
> In another context it does something different. The place where it's 
> different needs to be diagnosed and fixed.
> 
> -Steve

Isn't it relevant to https://issues.dlang.org/show_bug.cgi?id=11730 ?


More information about the Digitalmars-d-learn mailing list