[Issue 18256] New: Using std.range.put to put a character into a dchar[] segfaults
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jan 17 16:08:11 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=18256
          Issue ID: 18256
           Summary: Using std.range.put to put a character into a dchar[]
                    segfaults
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: installer
          Assignee: nobody at puremagic.com
          Reporter: jack at jackstouffer.com
import std.stdio;
import std.range;
void main(string[] args)
{
    dchar[] a = cast(dchar[]) "aaa"d;
    // all three of these segfault
    put(a, cast(dchar) 'b');
    put(a, cast(wchar) 'b');
    put(a, cast(char) 'b');
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list