diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-28 22:35:09 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-28 22:36:49 +0200 |
commit | aae91eddee1a90dc5312ce156b772f090001721f (patch) | |
tree | 6ce2de879d48939ba1914e8e450ff77f45c5c89c /src/dotty/tools/dotc/core/StdNames.scala | |
parent | f7d3f3b12e0f3f69954bfb9980134968abf541f5 (diff) | |
download | dotty-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.scala | 10 |
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] { |