aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src/std/internal
diff options
context:
space:
mode:
Diffstat (limited to 'libphobos/src/std/internal')
-rw-r--r--libphobos/src/std/internal/test/sumtype_example_overloads.d17
1 files changed, 17 insertions, 0 deletions
diff --git a/libphobos/src/std/internal/test/sumtype_example_overloads.d b/libphobos/src/std/internal/test/sumtype_example_overloads.d
new file mode 100644
index 0000000..235659d
--- /dev/null
+++ b/libphobos/src/std/internal/test/sumtype_example_overloads.d
@@ -0,0 +1,17 @@
+/++
+For testing only.
+
+Overload set used in std.sumtype example. Needs its own internal module so that
+it can be available for `make publictests` without polluting the public API.
++/
+module std.internal.test.sumtype_example_overloads;
+
+import std.sumtype;
+
+@safe
+{
+ string handle(int) { return "got an int"; }
+ string handle(string) { return "got a string"; }
+ string handle(double) { return "got a double"; }
+ alias handle = match!handle;
+}