[Issue 21742] New: dot template expressions don't have the void type like any template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 21 20:33:28 UTC 2021


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

          Issue ID: 21742
           Summary: dot template expressions don't have the void type like
                    any template
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: boris2.9 at gmail.com

int foo()() { return 0; }

struct B
{
    int foo()() { return 0; }
}

// works
static assert(is(typeof(foo) == void));

// fails, gagged error: expression B().foo()() has no type
static assert(is(typeof(B().foo) == void));

--


More information about the Digitalmars-d-bugs mailing list