blob: 1b3ec7b647f7f44f2d08117bffa2463d1a48477a [file] [log] [blame]
// Copyright (c) 2018, 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.
// @dart = 2.9
/// @assertion The static type of a double valued integer literal is [double]
/// @description Checks that the static type of a double valued integer literal
/// is [double]. Test that it is a compile error if int is not assignable to type
/// X with is not [double]
/// @author sgrekhov@unipro.ru
class C<X extends num> {
X x1 = 42;
// ^^
// [analyzer] unspecified
// [cfe] unspecified
X x2 = 0x42;
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
}
main() {
C<double> c = new C<double>();
}