mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
15 lines
291 B
D
15 lines
291 B
D
module test8509;
|
|
enum E : string { a = "hello", b = "world" }
|
|
struct S
|
|
{
|
|
E opBinary(string s : "~")(S s) { return E.a; }
|
|
E opBinary(string s : "~")(string s) { return E.a; }
|
|
}
|
|
|
|
void main()
|
|
{
|
|
E e3 = S() ~ S();
|
|
E e4 = S() ~ "a";
|
|
assert(e3 == E.a);
|
|
assert(e4 == E.a);
|
|
}
|