File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1697,7 +1697,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
16971697
16981698 void _appendInferredType (TreeNode node, int pc) {
16991699 final InferredType md = inferredTypeMetadata[node];
1700- if (md == null ) {
1700+ if (md == null || (pc >= 0 && asm.isUnreachable) ) {
17011701 return ;
17021702 }
17031703 inferredTypesAttribute ?? = < Constant > [];
Original file line number Diff line number Diff line change 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+ // Regression test for dartbug.com/38965.
6+
7+ int a = - 1 ;
8+
9+ main () {
10+ false ? (- 0.0 as int ) : (++ a);
11+ }
You can’t perform that action at this time.
0 commit comments