summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2015-03-28 09:46:15 +0100
committerLukas Rytz <lukas.rytz@typesafe.com>2015-03-28 09:46:15 +0100
commit955eb2170e1291500813e6bec76a9f0e1e3bad50 (patch)
tree09676def1c96e80a962728711c4c1ab4fb1732d4 /test
parentc505b6c4522166dde936f2b6ba6d42c15874ae41 (diff)
parentd4546fd74f94c653200200ef09cbbf2e1a808668 (diff)
downloadscala-955eb2170e1291500813e6bec76a9f0e1e3bad50.tar.gz
scala-955eb2170e1291500813e6bec76a9f0e1e3bad50.tar.bz2
scala-955eb2170e1291500813e6bec76a9f0e1e3bad50.zip
Merge pull request #4318 from soc/topic/remove-deprecation-warnings
Remove deprecation warnings
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