File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -802,7 +802,7 @@ class Definitions {
802802 @ tu lazy val TASTYLongSignatureAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.internal.TASTYLongSignature" )
803803 @ tu lazy val TailrecAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.tailrec" )
804804 @ tu lazy val ThreadUnsafeAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.threadUnsafe" )
805- @ tu lazy val TransientParamAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.constructorOnly" )
805+ @ tu lazy val ConstructorOnlyAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.constructorOnly" )
806806 @ tu lazy val CompileTimeOnlyAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.compileTimeOnly" )
807807 @ tu lazy val SwitchAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.switch" )
808808 @ tu lazy val ThrowsAnnot : ClassSymbol = ctx.requiredClass(" scala.throws" )
Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
229229 }
230230 else {
231231 val param = acc.subst(accessors, paramSyms)
232- if (param.hasAnnotation(defn.TransientParamAnnot ))
233- ctx.error(em " transient parameter $ acc is retained as field in class ${acc.owner}" , acc.sourcePos)
232+ if (param.hasAnnotation(defn.ConstructorOnlyAnnot ))
233+ ctx.error(em " ${ acc.name} is marked `@constructorOnly` but it is retained as a field in ${acc.owner}" , acc.sourcePos)
234234 val target = if (acc.is(Method )) acc.field else acc
235235 if (! target.exists) Nil // this case arises when the parameter accessor is an alias
236236 else {
You can’t perform that action at this time.
0 commit comments