summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala7
-rw-r--r--src/library/scala/io/BytePickle.scala1
-rw-r--r--src/library/scala/io/Position.scala1
-rw-r--r--src/library/scala/io/UTF8Codec.scala1
-rw-r--r--src/library/scala/testing/Benchmark.scala1
-rw-r--r--src/library/scala/testing/Show.scala1
-rw-r--r--src/library/scala/util/logging/ConsoleLogger.scala1
-rw-r--r--src/library/scala/util/logging/Logged.scala1
-rw-r--r--test/files/pos/t6294.scala14
9 files changed, 26 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 431802d185..739aa2b184 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -121,10 +121,13 @@ abstract class GenICode extends SubComponent {
m.native = m.symbol.hasAnnotation(definitions.NativeAttr)
if (!m.isAbstractMethod && !m.native) {
- if (m.symbol.isAccessor && m.symbol.accessed.hasStaticAnnotation) {
+ val staticfield = if (m.symbol.isAccessor && m.symbol.accessed.hasStaticAnnotation) {
+ val compClass = m.symbol.owner.companionClass
+ compClass.info.findMember(m.symbol.accessed.name, NoFlags, NoFlags, false)
+ } else NoSymbol
+ if (staticfield != NoSymbol) {
// in companion object accessors to @static fields, we access the static field directly
val hostClass = m.symbol.owner.companionClass
- val staticfield = hostClass.info.findMember(m.symbol.accessed.name, NoFlags, NoFlags, false)
if (m.symbol.isGetter) {
ctx1.bb.emit(LOAD_FIELD(staticfield, true) setHostClass hostClass, tree.pos)
diff --git a/src/library/scala/io/BytePickle.scala b/src/library/scala/io/BytePickle.scala
index 3bb5ea9c2b..a199986141 100644
--- a/src/library/scala/io/BytePickle.scala
+++ b/src/library/scala/io/BytePickle.scala
@@ -19,6 +19,7 @@ import scala.collection.mutable
* @author Philipp Haller
* @version 1.1
*/
+@deprecated("This class will be removed.", "2.10.0")
object BytePickle {
abstract class SPU[T] {
def appP(a: T, state: PicklerState): PicklerState
diff --git a/src/library/scala/io/Position.scala b/src/library/scala/io/Position.scala
index 5d1e695add..0d0d0d7648 100644
--- a/src/library/scala/io/Position.scala
+++ b/src/library/scala/io/Position.scala
@@ -32,6 +32,7 @@ package scala.io
* }}}
* @author Burak Emir (translated from work by Matthias Zenger and others)
*/
+@deprecated("This class will be removed.", "2.10.0")
abstract class Position {
/** Definable behavior for overflow conditions.
*/
diff --git a/src/library/scala/io/UTF8Codec.scala b/src/library/scala/io/UTF8Codec.scala
index df0a36ef21..aa6cccf1d1 100644
--- a/src/library/scala/io/UTF8Codec.scala
+++ b/src/library/scala/io/UTF8Codec.scala
@@ -13,6 +13,7 @@ package scala.io
* @author Martin Odersky
* @version 1.0, 04/10/2004
*/
+@deprecated("This class will be removed.", "2.10.0")
object UTF8Codec {
final val UNI_REPLACEMENT_CHAR: Int = 0x0000FFFD
final val UNI_REPLACEMENT_BYTES = Array[Byte](-17, -65, -67)
diff --git a/src/library/scala/testing/Benchmark.scala b/src/library/scala/testing/Benchmark.scala
index 9acae34d4e..9c07fcab4f 100644
--- a/src/library/scala/testing/Benchmark.scala
+++ b/src/library/scala/testing/Benchmark.scala
@@ -33,6 +33,7 @@ import compat.Platform
*
* @author Iulian Dragos, Burak Emir
*/
+@deprecated("This class will be removed.", "2.10.0")
trait Benchmark {
/** this method should be implemented by the concrete benchmark.
diff --git a/src/library/scala/testing/Show.scala b/src/library/scala/testing/Show.scala
index 5ab46b8985..da1868c7f6 100644
--- a/src/library/scala/testing/Show.scala
+++ b/src/library/scala/testing/Show.scala
@@ -25,6 +25,7 @@ package scala.testing
* where `<result>` is the result of evaluating the call.
*
*/
+@deprecated("This class will be removed.", "2.10.0")
trait Show {
/** An implicit definition that adds an apply method to Symbol which forwards to `test`.
diff --git a/src/library/scala/util/logging/ConsoleLogger.scala b/src/library/scala/util/logging/ConsoleLogger.scala
index 58284797b4..1d9a4deb62 100644
--- a/src/library/scala/util/logging/ConsoleLogger.scala
+++ b/src/library/scala/util/logging/ConsoleLogger.scala
@@ -17,6 +17,7 @@ package scala.util.logging
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed.", "2.10.0")
trait ConsoleLogger extends Logged {
/** logs argument to Console using [[scala.Console.println]]
diff --git a/src/library/scala/util/logging/Logged.scala b/src/library/scala/util/logging/Logged.scala
index d23b38c569..1476c8bf08 100644
--- a/src/library/scala/util/logging/Logged.scala
+++ b/src/library/scala/util/logging/Logged.scala
@@ -22,6 +22,7 @@ package scala.util.logging
* }}}
* and the logging is sent to the [[scala.util.logging.ConsoleLogger]] object.
*/
+@deprecated("This class will be removed.", "2.10.0")
trait Logged {
/** This method should log the message given as argument somewhere
* as a side-effect.
diff --git a/test/files/pos/t6294.scala b/test/files/pos/t6294.scala
new file mode 100644
index 0000000000..c6d39a9cc8
--- /dev/null
+++ b/test/files/pos/t6294.scala
@@ -0,0 +1,14 @@
+
+
+
+object A {
+ @annotation.static final val x = 123
+}
+
+
+object B {
+ println(A.x)
+}
+
+
+