www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20182] New: [REG 2.086.0] std.traits.ParameterDefaults fails

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

          Issue ID: 20182
           Summary: [REG 2.086.0] std.traits.ParameterDefaults fails for
                    copy constructor of nested struct
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: snarwin+bugzilla gmail.com

Test case:

---
void main()
{
    import std.traits: ParameterDefaults;

    struct S
    {
        this(ref S) {}
    }

    pragma(msg, ParameterDefaults!(S.__ctor));
}
---

2.068.2 to 2.085.1: Success with output: (void)
Since      2.086.0: Failure with output:
-----
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d-mixin-1489(1497):
Error: cannot access frame pointer of `onlineapp.main.S`
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d-mixin-1489(1500):
Error: cannot access frame pointer of `onlineapp.main.S`
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d(1524): Error:
template instance `std.traits.ParameterDefaults!(__ctor).Get!0LU` error
instantiating
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d(1527):       
instantiated from here: `Impl!0LU`
onlineapp.d(10):        instantiated from here: `ParameterDefaults!(__ctor)`
onlineapp.d(10):        while evaluating `pragma(msg,
ParameterDefaults!(__ctor))`
-----

--
Aug 29 2019