| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 readInFinally(/*inTry*/ parameter) { | 5 readParameterInFinally(/*inTry*/ parameter) { |
| 6 try { | 6 try { |
| 7 if (parameter) { | 7 if (parameter) { |
| 8 throw ''; | 8 throw ''; |
| 9 } | 9 } |
| 10 } finally {} | 10 } finally {} |
| 11 } | 11 } |
| 12 | 12 |
| 13 writeInFinally(/*inTry*/ parameter) { | 13 writeParameterInFinally(/*inTry*/ parameter) { |
| 14 try { | 14 try { |
| 15 parameter = 42; | 15 parameter = 42; |
| 16 throw ''; | 16 throw ''; |
| 17 } finally {} | 17 } finally {} |
| 18 } | 18 } |
| 19 | 19 |
| 20 readLocalInFinally(/**/ parameter) { |
| 21 var /*inTry*/ local = parameter; |
| 22 try { |
| 23 if (local) { |
| 24 throw ''; |
| 25 } |
| 26 } finally {} |
| 27 } |
| 28 |
| 29 writeLocalInFinally(/**/ parameter) { |
| 30 // ignore: UNUSED_LOCAL_VARIABLE |
| 31 var /*inTry*/ local = parameter; |
| 32 try { |
| 33 local = 42; |
| 34 throw ''; |
| 35 } finally {} |
| 36 } |
| 37 |
| 20 main() { | 38 main() { |
| 21 readInFinally(null); | 39 readParameterInFinally(null); |
| 22 writeInFinally(null); | 40 writeParameterInFinally(null); |
| 41 readLocalInFinally(null); |
| 42 writeLocalInFinally(null); |
| 23 } | 43 } |
| OLD | NEW |