[Issue 20653] New: Short-circuiting boolean logic not working
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Mar  9 17:46:28 UTC 2020
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20653
          Issue ID: 20653
           Summary: Short-circuiting boolean logic not working
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com
I feel like this should work:
enum Thing { A, B }
enum IsThing(T) = is(T == enum) || (__traits(getLinkage, T) == "C++");
enum Is = IsThing!Thing;
> Error: argument to `__traits(getLinkage, Thing)` is not a declaration
> Error: template instance `IsThing!(Thing)` error instantiating
`is(T == enum)` is true, so it shouldn't attempt to evaluate `getLinkage`.
--
    
    
More information about the Digitalmars-d-bugs
mailing list