Chromium Code Reviews| Index: pkg/compiler/lib/src/resolution/members.dart |
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
| index 1aa2d17ebba2e53bce1bfa0248507f6d225fbb42..d2e2f6e35b5e6d7c288f7d2ebf6f4557a3bd046e 100644 |
| --- a/pkg/compiler/lib/src/resolution/members.dart |
| +++ b/pkg/compiler/lib/src/resolution/members.dart |
| @@ -3658,9 +3658,9 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
| } |
| ResolutionResult visitRethrow(Rethrow node) { |
| - if (!inCatchBlock) { |
| + if (!inCatchBlock && node.throwToken.stringValue == 'rethrow') { |
|
Siggi Cherem (dart-lang)
2016/02/18 21:04:13
I believe we don't need the extra check (I thought
floitsch
2016/02/18 21:12:18
Unfortunately it's required. A simple 'throw' is s
|
| reporter.reportErrorMessage( |
| - node, MessageKind.THROW_WITHOUT_EXPRESSION); |
| + node, MessageKind.RETHROW_OUTSIDE_CATCH); |
| } |
| return const NoneResult(); |
| } |