mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:59:47 +00:00
d0d2e2591f
Change-Id: Ia28b44a9acdcb9a38ebb101029dc50b58d272b23 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275786 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
54 lines
933 B
Dart
54 lines
933 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
part of malformed_test;
|
|
|
|
void testValue(var o) {
|
|
o is Unresolved1;
|
|
o is List<Unresolved2>;
|
|
o is! Unresolved3;
|
|
o is! List<Unresolved4>;
|
|
|
|
try {
|
|
o as Unresolved5;
|
|
} catch (e) {
|
|
}
|
|
|
|
try {
|
|
o as List<Unresolved6>;
|
|
} catch (e) {
|
|
}
|
|
|
|
try {
|
|
} on Unresolved7 catch (e) {
|
|
} catch (e) {
|
|
}
|
|
|
|
try {
|
|
throw o;
|
|
} on Unresolved8 catch (e) {
|
|
} catch (e) {
|
|
}
|
|
|
|
try {
|
|
throw o;
|
|
} on List<String> catch (e) {
|
|
} on TypeError catch (e) {
|
|
} on Unresolved9 catch (e) {
|
|
} catch (e) {
|
|
}
|
|
|
|
try {
|
|
throw o;
|
|
} on List<Unresolved10> catch (e) {
|
|
} on TypeError catch (e) {
|
|
} on Unresolved11 catch (e) {
|
|
} catch (e) {
|
|
}
|
|
|
|
Unresolved12? u = o;
|
|
|
|
List<Unresolved13>? u2 = o;
|
|
}
|