blob: af88fa6170809470156c8a08c5c335aa72c09c7e [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 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()));
}