c3085e3164
This ensures that constructed constants use the same field layout as the emitted classes. R=het@google.com Committed: https://github.com/dart-lang/sdk/commit/67b71d0cb793d5faaa2ee6f070741cc775a3f59a Review URL: https://codereview.chromium.org/2072223002 . Reverted: https://github.com/dart-lang/sdk/commit/f817910fd03d49b42ec10346ae6f589d3dadae4e
29 lines
563 B
Dart
29 lines
563 B
Dart
// Copyright (c) 2016, 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 A {
|
|
final a;
|
|
|
|
const A(this.a);
|
|
}
|
|
|
|
class B extends A {
|
|
final b;
|
|
|
|
const B(a, this.b) : super(a);
|
|
}
|
|
|
|
@NoInline()
|
|
foo() => const B(1, 2);
|
|
|
|
@NoInline()
|
|
bar() => const B(2, 2);
|
|
|
|
void main() {
|
|
Expect.notEquals(foo(), bar());
|
|
Expect.notEquals(foo().a, bar().a);
|
|
Expect.equals(foo().b, bar().b);
|
|
} |