Chromium Code Reviews| Index: tests/language/malbounded_instantiation_test.dart |
| diff --git a/tests/language/malbounded_instantiation_test.dart b/tests/language/malbounded_instantiation_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..34c2357874d3fdbcfc8bf8839a53cd4b1f012260 |
| --- /dev/null |
| +++ b/tests/language/malbounded_instantiation_test.dart |
| @@ -0,0 +1,13 @@ |
| +// 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. |
| + |
| +class Super<T extends num> {} |
| +class Malbounded1 implements Super<String> {} /// 01: static type warning |
| +class Malbounded2 extends Super<String> {} /// 02: static type warning |
|
regis
2013/10/15 19:04:08
If you leave 01: and 02: out, you would verify tha
|
| + |
| +main() { |
| + new Malbounded1(); /// 01: dynamic type error |
| + new Malbounded2(); /// 02: dynamic type error |
| + new Super<String>(); /// 03: static type warning, dynamic type error |
| +} |