diff options
author | vsalvis <salvisbergvera@gmail.com> | 2015-07-10 17:10:01 +0200 |
---|---|---|
committer | VladimirNik <vladimir.nikolaev9@gmail.com> | 2016-02-18 18:00:03 +0100 |
commit | 418c118e3cf8c54fee1f2416e2bb2ba3996d8578 (patch) | |
tree | 4b34a0175a999873a22fa4a4bb7c5dd9e02fb4d7 /src/dotty/tools/dotc/reporting | |
parent | 1ed38673d4c88d573363459d316fdfe275d05025 (diff) | |
download | dotty-418c118e3cf8c54fee1f2416e2bb2ba3996d8578.tar.gz dotty-418c118e3cf8c54fee1f2416e2bb2ba3996d8578.tar.bz2 dotty-418c118e3cf8c54fee1f2416e2bb2ba3996d8578.zip |
Negtests (JUnit only) check that each error line has a // error
Diffstat (limited to 'src/dotty/tools/dotc/reporting')
-rw-r--r-- | src/dotty/tools/dotc/reporting/Reporter.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/reporting/Reporter.scala b/src/dotty/tools/dotc/reporting/Reporter.scala index 5ed7360da..d6e8199d8 100644 --- a/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/src/dotty/tools/dotc/reporting/Reporter.scala @@ -223,6 +223,8 @@ abstract class Reporter { var warningCount = 0 def hasErrors = errorCount > 0 def hasWarnings = warningCount > 0 + private var errors: List[Error] = Nil + def allErrors = errors /** Have errors been reported by this reporter, or in the * case where this is a StoreReporter, by an outer reporter? @@ -238,7 +240,9 @@ abstract class Reporter { d match { case d: ConditionalWarning if !d.enablingOption.value => unreportedWarnings(d.enablingOption.name) += 1 case d: Warning => warningCount += 1 - case d: Error => errorCount += 1 + case d: Error => + errors = d :: errors + errorCount += 1 case d: Info => // nothing to do here // match error if d is something else } |