aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/util/DotClass.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/util/DotClass.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/util/DotClass.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/util/DotClass.scala b/compiler/src/dotty/tools/dotc/util/DotClass.scala
new file mode 100644
index 000000000..cdb697a45
--- /dev/null
+++ b/compiler/src/dotty/tools/dotc/util/DotClass.scala
@@ -0,0 +1,12 @@
+package dotty.tools.dotc.util
+
+/** Adds standard functionality to a class.
+ * For now: Just the `unsupported` method.
+ */
+class DotClass {
+
+ /** Throws an `UnsupportedOperationException` with the given method name. */
+ def unsupported(methodName: String): Nothing =
+ throw new UnsupportedOperationException(s"$getClass.$methodName")
+
+}