www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22279] New: std.typecons.Tuple.toString calls get on null

https://issues.dlang.org/show_bug.cgi?id=22279

          Issue ID: 22279
           Summary: std.typecons.Tuple.toString calls get on null Nullable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: jack jackstouffer.com

Calling toString on a Tuple with a null Nullable results in a AssertError

Reduced case:

```
import std.typecons;
import std.stdio;

struct Result
{
    Nullable!(int, int.min) a;
}

auto func()
{
    Result res;
    return tuple(res);
}

void main()
{
    writeln(func());
}
```

--
Sep 04 2021