Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 9ff3c32

Browse files
committed
Added test case for GitHub ldc-developers/ldc#497.
1 parent cd99578 commit 9ff3c32

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

compilable/ldc_github_497.d

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import std.algorithm : all, canFind;
2+
3+
struct Foo {
4+
float a, b, c;
5+
6+
auto opDispatch(string swiz)() if (swiz.all!(x => "abc".canFind(x))) {
7+
return mixin("Foo(" ~ swiz[0] ~ "," ~ swiz[1] ~ "," ~ swiz[2] ~ ")");
8+
}
9+
}
10+
11+
auto f(Foo f) {
12+
return f.cab;
13+
}

0 commit comments

Comments
 (0)