mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
21 lines
307 B
D
21 lines
307 B
D
// https://issues.dlang.org/show_bug.cgi?id=22646
|
|
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
true
|
|
true
|
|
false
|
|
false
|
|
---
|
|
*/
|
|
|
|
static template Bug(string name)
|
|
{
|
|
enum bool ok = name.length < 3 || name[0..3] != "pad";
|
|
}
|
|
|
|
pragma(msg, Bug!"x".ok);
|
|
pragma(msg, Bug!"foo".ok);
|
|
pragma(msg, Bug!"pad".ok);
|
|
pragma(msg, Bug!"pad123".ok);
|