summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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