Skip to content

Commit 08f3c2f

Browse files
committed
Add explicit @experimental to inner experimental classes
MiMa seems to check if the definition is experimental but it is missing the check if the owner is experimental.
1 parent 004a2fd commit 08f3c2f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

library/src/scala/annotation/MainAnnotation.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ object MainAnnotation:
9191
* @param documentation The documentation of the main method without the `@param` documentation (see Parameter.documentaion)
9292
* @param parameters Information about the parameters of the main method
9393
*/
94+
@experimental // MiMa does not check scope inherited @experimental
9495
final class Info(
9596
val name: String,
9697
val documentation: String,
@@ -111,6 +112,7 @@ object MainAnnotation:
111112
* @param documentation The documentation of the parameter (from `@param` documentation in the main method)
112113
* @param annotations The annotations of the parameter that extend `ParameterAnnotation`
113114
*/
115+
@experimental // MiMa does not check scope inherited @experimental
114116
final class Parameter(
115117
val name: String,
116118
val typeName: String,
@@ -121,6 +123,7 @@ object MainAnnotation:
121123
)
122124

123125
/** Marker trait for annotations that will be included in the Parameter annotations. */
126+
@experimental // MiMa does not check scope inherited @experimental
124127
trait ParameterAnnotation extends StaticAnnotation
125128

126129
end MainAnnotation

library/src/scala/annotation/newMain.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ final class newMain extends MainAnnotation[FromString, Any]:
217217
hasParseErrors = true
218218
() => throw new AssertionError("trying to get invalid argument")
219219

220-
220+
@experimental // MiMa does not check scope inherited @experimental
221221
private object Help:
222222

223223
/** The name of the special argument to display the method's help.
@@ -321,6 +321,7 @@ final class newMain extends MainAnnotation[FromString, Any]:
321321

322322
end Help
323323

324+
@experimental // MiMa does not check scope inherited @experimental
324325
private class Names(info: Info):
325326

326327
checkNames()

0 commit comments

Comments
 (0)