summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 645d3ecfa0..98f1c96cad 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1273,8 +1273,10 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
* indicating it has changed semantics between versions.
*/
private def checkMigration(sym: Symbol, pos: Position) = {
- for (msg <- sym.migrationMessage)
- unit.warning(pos, sym.fullLocationString + " has changed semantics:\n" + msg)
+ if (sym.hasMigrationAnnotation)
+ unit.warning(pos, "%s has changed semantics in version %s:\n%s".format(
+ sym.fullLocationString, sym.migrationVersion.get, sym.migrationMessage.get)
+ )
}
private def lessAccessible(otherSym: Symbol, memberSym: Symbol): Boolean = (