aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/util/SourceFile.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-07-01 15:59:33 +0200
committerMartin Odersky <odersky@gmail.com>2015-07-06 17:46:45 +0200
commit84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c (patch)
tree309525b19d9f063a384d4e2561f0b29a34986c43 /src/dotty/tools/dotc/util/SourceFile.scala
parent64f65182f6e4f80b03d45923e02441dafe0755b4 (diff)
downloaddotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.tar.gz
dotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.tar.bz2
dotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.zip
Add @sharable annotation
Add @sharable annotation for classes and vals that are presumed to be safely sharable between threads. Also: Document CtxLazy.
Diffstat (limited to 'src/dotty/tools/dotc/util/SourceFile.scala')
-rw-r--r--src/dotty/tools/dotc/util/SourceFile.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/util/SourceFile.scala b/src/dotty/tools/dotc/util/SourceFile.scala
index 5e8f85e28..20933976e 100644
--- a/src/dotty/tools/dotc/util/SourceFile.scala
+++ b/src/dotty/tools/dotc/util/SourceFile.scala
@@ -131,7 +131,7 @@ case class SourceFile(file: AbstractFile, content: Array[Char]) {
override def toString = file.toString
}
-object NoSource extends SourceFile("<no source>", Nil) {
+@sharable object NoSource extends SourceFile("<no source>", Nil) {
override def exists = false
}