Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // Testing that a void block function is not allowed to `return e` | |
| 6 // where `e` is non-void. | |
| 7 | |
| 8 void foo() { | |
| 9 return 42; //# 00: static type warning | |
| 10 } | |
| 11 | |
| 12 main() { | |
| 13 foo(); | |
| 14 } | |
| OLD | NEW |