Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: tests/language/function_type2_test.dart

Issue 32203002: Fix crash https://code.google.com/p/dart/issues/detail?id=14014: remove what seems to be obsolete c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, 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 import "package:expect/expect.dart";
6
7 bool get inCheckedMode {
8 try {
9 String a = 42;
10 } catch (e) {
11 return true;
12 }
13 return false;
14 }
15
16 class A<T> {
17 A(f) {
18 f(42);
19 }
20 }
21
22 class B<T> extends A<T> {
23 B() : super((T param) => 42);
24 }
25
26 main() {
27 var t = new B<int>();
28 bool caughtException = false;
29
30 try {
31 new B<String>();
32 } on TypeError catch (e) {
33 caughtException = true;
34 }
35 Expect.isTrue(!inCheckedMode || caughtException);
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698