blob: 4c1823af644313a51176886b284147522adf126e [file] [log] [blame]
# Copyright (c) 2017, 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.md file.
main.dart.patch: |
// Test that constants are retained
class Foo {
const Foo();
}
class Bar {
final f = const Foo();
const Bar();
}
class Baz {
final f = const Foo();
const Baz();
}
class C {
foo() {
<<<< ["true"]
return const Foo();
==== ["true"]
return const Bar().f;
==== ["true"]
return const Baz().f;
>>>>
}
}
void main() {
var c = new C();
print(identical(c.foo(), const Foo()));
}