33fcaec0f1
The expression evaluator called directly into the constant evaluator, skipping the setting up of the exhaustiveness cache used for exhaustiveness checking. Closes #52905 Change-Id: I367ff73d8e23127811f99dfbf451e66eef452443 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314060 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
42 lines
904 B
YAML
42 lines
904 B
YAML
# Copyright (c) 2023, 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.
|
|
|
|
sources: |
|
|
class Color {
|
|
final String name;
|
|
Color(this.name);
|
|
}
|
|
|
|
class Theme {
|
|
Color get primary => Color('primary');
|
|
Color get white => Color('white');
|
|
Color get transparent => Color('transparent');
|
|
}
|
|
|
|
enum _Type {
|
|
primary,
|
|
background,
|
|
outline,
|
|
text,
|
|
}
|
|
|
|
class Class {
|
|
final _Type _type;
|
|
final Theme theme;
|
|
final Color? backgroundColor;
|
|
|
|
Class(this._type, this.theme, this.backgroundColor);
|
|
|
|
method() {
|
|
}
|
|
}
|
|
definitions: []
|
|
position: "#Class"
|
|
expression: |
|
|
switch (_type) {
|
|
_Type.primary => theme.primary,
|
|
_Type.background => theme.white,
|
|
_Type.outline || _Type.text => theme.transparent,
|
|
}
|