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 {
802
802
@ tu lazy val TASTYLongSignatureAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.internal.TASTYLongSignature" )
803
803
@ tu lazy val TailrecAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.tailrec" )
804
804
@ 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" )
806
806
@ tu lazy val CompileTimeOnlyAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.compileTimeOnly" )
807
807
@ tu lazy val SwitchAnnot : ClassSymbol = ctx.requiredClass(" scala.annotation.switch" )
808
808
@ 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 =
229
229
}
230
230
else {
231
231
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)
234
234
val target = if (acc.is(Method )) acc.field else acc
235
235
if (! target.exists) Nil // this case arises when the parameter accessor is an alias
236
236
else {
You can’t perform that action at this time.
0 commit comments