diff options
-rw-r--r-- | src/reflect/scala/reflect/api/Names.scala | 2 | ||||
-rw-r--r-- | test/files/run/t6323b.scala | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/api/Names.scala b/src/reflect/scala/reflect/api/Names.scala index 30c512ab64..fe5f47c25d 100644 --- a/src/reflect/scala/reflect/api/Names.scala +++ b/src/reflect/scala/reflect/api/Names.scala @@ -87,11 +87,13 @@ trait Names { /** Replaces all occurrences of \$op_names in this name by corresponding operator symbols. * Example: `foo_\$plus\$eq` becomes `foo_+=` */ + @deprecated("Use `decodedName.toString` instead", "2.11.0") def decoded: String /** Replaces all occurrences of operator symbols in this name by corresponding \$op_names. * Example: `foo_+=` becomes `foo_\$plus\$eq`. */ + @deprecated("Use `encodedName.toString` instead", "2.11.0") def encoded: String /** The decoded name, still represented as a name. diff --git a/test/files/run/t6323b.scala b/test/files/run/t6323b.scala index f530ac3ecc..50d0900c7f 100644 --- a/test/files/run/t6323b.scala +++ b/test/files/run/t6323b.scala @@ -10,7 +10,7 @@ object Test extends App { val lookAtMe = m.reflect(Test("a",List(5))) val value = u.weakTypeOf[Test] val members = value.members - val member = value.members.filter(_.name.encoded == "a") + val member = value.members.filter(_.name.encodedName == TermName("a")) val aAccessor = lookAtMe.reflectMethod(member.head.asMethod) val thisShouldBeA = aAccessor.apply() println(thisShouldBeA) |