diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-11 14:42:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-11 14:42:56 +0100 |
commit | 459d78dccc40c94dd7da8b5b29762a494595778b (patch) | |
tree | 2d678de090302dab70d7079730f8ed4cc258b667 /src/dotty/tools/dotc/util/DotClass.scala | |
parent | e895249de8f59e5a5c4175b428193fa4c5ea90af (diff) | |
download | dotty-459d78dccc40c94dd7da8b5b29762a494595778b.tar.gz dotty-459d78dccc40c94dd7da8b5b29762a494595778b.tar.bz2 dotty-459d78dccc40c94dd7da8b5b29762a494595778b.zip |
New scheme for attachments.
Added general way to put attachments on some base type (which needs to inherit from Attachment.Container).
Used it to turn typedTree map into an attachment.
Also, moved DotClass to dotc.util.
Diffstat (limited to 'src/dotty/tools/dotc/util/DotClass.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/DotClass.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/util/DotClass.scala b/src/dotty/tools/dotc/util/DotClass.scala new file mode 100644 index 000000000..7839fc37d --- /dev/null +++ b/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") + +}
\ No newline at end of file |