Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2010993002: Migrate UnlinkedParam.defaultValue to UnlinkedExecutable.bodyExpr. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 78d0f5f496275bf18d56e98cef9fd068b33ae782..8e7ca3c3fb71c3f82740c5eaf1e09153002bc6fb 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1827,7 +1827,7 @@ class DefaultParameterElementImpl extends ParameterElementImpl
@override
Expression get constantInitializer {
if (_unlinkedParam != null) {
- UnlinkedConst defaultValue = _unlinkedParam.defaultValue;
+ UnlinkedConst defaultValue = _unlinkedParam.initializer?.bodyExpr;
if (defaultValue == null) {
return null;
}
@@ -5748,7 +5748,7 @@ class ParameterElementImpl extends VariableElementImpl
@override
String get defaultValueCode {
if (_unlinkedParam != null) {
- if (_unlinkedParam.defaultValue == null) {
+ if (_unlinkedParam.initializer?.bodyExpr == null) {
return null;
}
return _unlinkedParam.defaultValueCode;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698