File tree 2 files changed +12
-4
lines changed
src/compiler/scala/tools/nsc
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -522,6 +522,7 @@ object Reporting {
522
522
def includes (o : WarningCategory ): Boolean = this eq o
523
523
def summaryCategory : WarningCategory = this
524
524
lazy val name : String = WarningCategory .nameOf(this )
525
+ override def toString = name
525
526
}
526
527
527
528
object WarningCategory {
@@ -722,7 +723,7 @@ object Reporting {
722
723
}
723
724
724
725
object MessageFilter {
725
- object Any extends MessageFilter {
726
+ case object Any extends MessageFilter {
726
727
def matches (message : Message ): Boolean = true
727
728
}
728
729
@@ -768,7 +769,9 @@ object Reporting {
768
769
}
769
770
}
770
771
771
- sealed trait Action
772
+ sealed trait Action {
773
+ override def toString = s " Action[ ${getClass.getSimpleName.stripSuffix(" $" )}] "
774
+ }
772
775
773
776
object Action {
774
777
object Error extends Action
Original file line number Diff line number Diff line change @@ -82,8 +82,13 @@ trait Warnings {
82
82
|The default configuration is:
83
83
| -Wconf: ${WconfDefault .mkString(" ," )}
84
84
|
85
- |User-defined configurations are added to the left. The leftmost rule matching
86
- |a warning message defines the action.
85
+ |Under -Xsource:3-cross, the category of scala3-migration warnings are errors by default:
86
+ | -Wconf:cat=scala3-migration:e
87
+ |Under -Xsource:3-migration, they are warnings:
88
+ | -Wconf:cat=scala3-migration:w
89
+ |
90
+ |User-defined configurations override previous settings, such that the last matching
91
+ |configuration defines the action for a given diagnostic message.
87
92
|
88
93
|Examples:
89
94
| - change every warning into an error: -Wconf:any:error
You can’t perform that action at this time.
0 commit comments