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 @@ -804,7 +804,7 @@ class Definitions {
804804 @ tu lazy val TASTYLongSignatureAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.internal.TASTYLongSignature" )
805805 @ tu lazy val TailrecAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.tailrec" )
806806 @ tu lazy val ThreadUnsafeAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.threadUnsafe" )
807- @ tu lazy val TransientParamAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.constructorOnly" )
807+ @ tu lazy val ConstructorOnlyAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.constructorOnly" )
808808 @ tu lazy val CompileTimeOnlyAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.compileTimeOnly" )
809809 @ tu lazy val SwitchAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.switch" )
810810 @ tu lazy val ThrowsAnnot : ClassSymbol = ctx.requiredClass(" scala.throws" )
Original file line number Diff line number Diff line change @@ -228,8 +228,8 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
228228 Nil
229229 }
230230 else {
231- if (acc.hasAnnotation(defn.TransientParamAnnot ))
232- ctx.error(em " transient parameter $ acc is retained as field in class ${acc.owner}" , acc.sourcePos)
231+ if (acc.hasAnnotation(defn.ConstructorOnlyAnnot ))
232+ ctx.error(em " ${ acc.name} is marked `@constructorOnly` but it is retained as a field in ${acc.owner}" , acc.sourcePos)
233233 val target = if (acc.is(Method )) acc.field else acc
234234 if (! target.exists) Nil // this case arises when the parameter accessor is an alias
235235 else {
You can’t perform that action at this time.
0 commit comments