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