diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-05-22 11:44:58 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-06-01 14:35:22 +0300 |
commit | 4b800a12fa66542a497f189454de16a0a1866e03 (patch) | |
tree | 5f711b2fdf061f2d6b6803770a8f7cd5e8842868 /src/compiler | |
parent | 3914e2bca4f28fd565a24506980b3261b4588328 (diff) | |
download | scala-4b800a12fa66542a497f189454de16a0a1866e03.tar.gz scala-4b800a12fa66542a497f189454de16a0a1866e03.tar.bz2 scala-4b800a12fa66542a497f189454de16a0a1866e03.zip |
Unit tests for new BType classes
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala index e6b2136be2..9aedc7f8b4 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala @@ -256,7 +256,10 @@ abstract class BTypes[G <: Global](val __global_dont_use: G) { * * @param s A class name of the form "java/lang/String", without the surrounding 'L' and ';'. */ - def this(s: String) = this(createNewName(s)) + def this(s: String) = this({ + assert(!(s.head == 'L' && s.last == ';'), s"Descriptor instead of internal name: $s") + createNewName(s) + }) /** * The internal name of a class is the string returned by java.lang.Class.getName, with all '.' |