bd60fa1ad5
For constant field initializers, compile the initializer expression to Kernel, perform local type inference, and perform necessary rewrites during outline construction. This will support constant evaluation during separate compilation. Change-Id: I65fe601595c04c45d586d0bac97c2ade6ab15a90 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104564 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Kevin Millikin <kmillikin@google.com>
25 lines
662 B
Plaintext
25 lines
662 B
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
typedef hest_t = ({named: dynamic}) → dynamic;
|
|
class Bar extends core::Object {
|
|
const constructor •() → self::Bar
|
|
;
|
|
const constructor named(dynamic x) → self::Bar
|
|
;
|
|
}
|
|
class Baz extends core::Object {
|
|
constructor •(dynamic constructorFormal) → self::Baz
|
|
;
|
|
static factory bazFactory(dynamic factoryFormal) → self::Baz
|
|
;
|
|
method fisk(dynamic formal1, dynamic formal2, dynamic formal3, dynamic formal4, [dynamic optional]) → dynamic
|
|
;
|
|
method hest({dynamic named}) → dynamic
|
|
;
|
|
}
|
|
static const field core::int foo = 42;
|
|
static method main() → dynamic
|
|
;
|