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

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

Issue 1232613005: Allow super calls in mixins (for now behind a --supermixin flag). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class C0 extends Object 5 // Object has a non-trivial constructor and hence cannot be used as mixin.
6
7 class S { }
8
9 class C0 extends S
6 with Object /// 01: compile-time error 10 with Object /// 01: compile-time error
7 { } 11 { }
8 12
9 class C1 = Object with Object; /// 02: compile-time error 13 class C1 = S with Object; /// 02: compile-time error
10 14
11 main() { 15 main() {
12 new C0(); 16 new C0();
13 new C1(); /// 02: continued 17 new C1(); /// 02: continued
14 } 18 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698