aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/StdNames.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-28 22:35:09 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-28 22:36:49 +0200
commitaae91eddee1a90dc5312ce156b772f090001721f (patch)
tree6ce2de879d48939ba1914e8e450ff77f45c5c89c /src/dotty/tools/dotc/core/StdNames.scala
parentf7d3f3b12e0f3f69954bfb9980134968abf541f5 (diff)
downloaddotty-aae91eddee1a90dc5312ce156b772f090001721f.tar.gz
dotty-aae91eddee1a90dc5312ce156b772f090001721f.tar.bz2
dotty-aae91eddee1a90dc5312ce156b772f090001721f.zip
Fixes to erasure to make -Ycheck:all work.
Main change: Introduce JavaArrayType as a new type constructor for Java erased array. Translate all methods of Array class during erasure to primitive operations on arrays. Some other small fixes for more localized problems.
Diffstat (limited to 'src/dotty/tools/dotc/core/StdNames.scala')
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala
index 91a77a2a8..af4e810de 100644
--- a/src/dotty/tools/dotc/core/StdNames.scala
+++ b/src/dotty/tools/dotc/core/StdNames.scala
@@ -635,6 +635,16 @@ object StdNames {
def newBitmapName(bitmapPrefix: TermName, n: Int): TermName = bitmapPrefix ++ n.toString
def selectorName(n: Int): TermName = "_" + (n + 1)
+
+ object primitive {
+ val arrayApply: TermName = "[]apply"
+ val arrayUpdate: TermName = "[]update"
+ val arrayLength: TermName = "[]length"
+ val arrayConstructor: TermName = "[]<init>"
+ val names: Set[Name] = Set(arrayApply, arrayUpdate, arrayLength, arrayConstructor)
+ }
+
+ def isPrimitiveName(name: Name) = primitive.names.contains(name)
}
class ScalaTypeNames extends ScalaNames[TypeName] {