www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22041] New: SumType assignments should work with pointers in

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

          Issue ID: 22041
           Summary: SumType assignments should work with pointers in  safe
                    code
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: safe
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: lsferreira169 gmail.com

Pretty much self-explainatory.

This should work in  safe code:

```d
alias FooBar = SumType!(int*);
auto foobar = FooBar(new int);
foobar = FooBar(new int);
```

--
Jun 18