summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2014-11-29 04:05:10 +0100
committerSimon Ochsenreither <simon@ochsenreither.de>2015-03-26 03:15:07 +0100
commit86999ed76b5d9df51c337c5e33fe265e04d8f39c (patch)
treef09526ab3075b9c5e9552eb1e564984a64b7df28 /test
parente5bfc1c097e8dea9e0643e4a43743196209e9ba8 (diff)
downloadscala-86999ed76b5d9df51c337c5e33fe265e04d8f39c.tar.gz
scala-86999ed76b5d9df51c337c5e33fe265e04d8f39c.tar.bz2
scala-86999ed76b5d9df51c337c5e33fe265e04d8f39c.zip
new{Term,Type}Name→{Term,Type}Name, tpename/nme→{type,term}Names
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/reflection-names-neg.check13
-rw-r--r--test/files/neg/reflection-names-neg.scala6
-rw-r--r--test/junit/scala/tools/nsc/symtab/SymbolTableTest.scala4
3 files changed, 2 insertions, 21 deletions
diff --git a/test/files/neg/reflection-names-neg.check b/test/files/neg/reflection-names-neg.check
deleted file mode 100644
index f941ec8dc1..0000000000
--- a/test/files/neg/reflection-names-neg.check
+++ /dev/null
@@ -1,13 +0,0 @@
-reflection-names-neg.scala:5: error: type mismatch;
- found : String("abc")
- required: reflect.runtime.universe.Name
-Note that implicit conversions are not applicable because they are ambiguous:
- both method stringToTermName in trait Names of type (s: String)reflect.runtime.universe.TermName
- and method stringToTypeName in trait Names of type (s: String)reflect.runtime.universe.TypeName
- are possible conversion functions from String("abc") to reflect.runtime.universe.Name
- val x2 = ("abc": Name) drop 1 // error
- ^
-reflection-names-neg.scala:5: error: value drop is not a member of reflect.runtime.universe.Name
- val x2 = ("abc": Name) drop 1 // error
- ^
-two errors found
diff --git a/test/files/neg/reflection-names-neg.scala b/test/files/neg/reflection-names-neg.scala
deleted file mode 100644
index 7283d16db9..0000000000
--- a/test/files/neg/reflection-names-neg.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-import scala.reflect.runtime.universe._
-
-object Test {
- val x1 = "abc" drop 1 // "bc": String
- val x2 = ("abc": Name) drop 1 // error
-}
diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableTest.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableTest.scala
index 895ad9d683..5a921a5eda 100644
--- a/test/junit/scala/tools/nsc/symtab/SymbolTableTest.scala
+++ b/test/junit/scala/tools/nsc/symtab/SymbolTableTest.scala
@@ -33,10 +33,10 @@ class SymbolTableTest {
import symbolTable._
symbolTable.definitions.init()
val rootClass = symbolTable.rootMirror.RootClass
- val fooSymbol = rootClass.newClassSymbol("Foo": TypeName, NoPosition, 0)
+ val fooSymbol = rootClass.newClassSymbol(TypeName("Foo"), NoPosition, 0)
val fooType = new ClassInfoType(Nil, EmptyScope, fooSymbol)
fooSymbol.info = fooType
- val barSymbol = rootClass.newClassSymbol("Bar": TypeName, NoPosition, 0)
+ val barSymbol = rootClass.newClassSymbol(TypeName("Bar"), NoPosition, 0)
val fooTypeRef = TypeRef(fooSymbol.owner.tpe, fooSymbol, Nil)
val barType = new ClassInfoType(List(fooTypeRef), EmptyScope, barSymbol)
barSymbol.info = barType