digitalmars.D.bugs - [Issue 22148] New: noreturn ICE on templates
- d-bugmail puremagic.com (32/32) Jul 27 2021 https://issues.dlang.org/show_bug.cgi?id=22148
https://issues.dlang.org/show_bug.cgi?id=22148 Issue ID: 22148 Summary: noreturn ICE on templates Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: temtaime gmail.com import std; bool throwError(string S, string File = __FILE__, uint Line = __LINE__, A...)(A args) { return throwError(args.format!S, File, Line); } noreturn throwError(T)(T value, string file = __FILE__, uint line = __LINE__) { throw new Exception(value.to!string, file, line); } void main() { try { throwError!`%s`(10); } catch(Exception) {} } Result: Illegal instruction (core dumped) Expected: pass OK --
Jul 27 2021