blob: 728ff68c4df4ce70da75c8ef765f2d2766271799 [file] [log] [blame]
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/*member: getInt:[exact=JSUInt31]*/
int get getInt => 42;
/*member: foo:Union(null, [exact=JSString], [exact=JSUInt31])*/
foo() {
dynamic local = 3;
for (int i = 0;
i /*invoke: [subclass=JSPositiveInt]*/ < 10;
i /*invoke: [subclass=JSPositiveInt]*/ ++) {
switch (getInt) {
case 42:
break;
default:
local = 'hello';
}
if (i /*invoke: [subclass=JSPositiveInt]*/ > 5) {
return local;
}
}
return null;
}
/*member: main:[null]*/
void main() {
foo();
}