mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:41:19 +00:00
c544068f6f
R=floitsch@google.com Review URL: https://codereview.chromium.org//897013003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43545 260f80e4-7a28-3924-810f-c04153c831b5
30 lines
831 B
Dart
30 lines
831 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.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class S {}
|
|
|
|
class M1<X> {
|
|
m1() => X;
|
|
}
|
|
|
|
class M2<Y> {
|
|
m2() => Y;
|
|
}
|
|
|
|
class A<T> extends S with M1<T> , M2<T> { }
|
|
|
|
main() {
|
|
var a = new A<int>();
|
|
// Getting "int" when calling toString() on the int type is not required.
|
|
// However, we want to keep the original names for the most common core types
|
|
// so we make sure to handle these specifically in the compiler.
|
|
Expect.equals("int", a.m1().toString());
|
|
Expect.equals("int", a.m2().toString());
|
|
a = new A<String>();
|
|
Expect.equals("String", a.m1().toString());
|
|
Expect.equals("String", a.m2().toString());
|
|
}
|