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

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

Issue 1648063002: Implement the spec's notion of LUB for function types. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix passing test. Created 4 years, 11 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 | « pkg/analyzer/lib/dart/element/type.dart ('k') | pkg/analyzer/lib/src/dart/element/type.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 34c4bc8c9e1a229f6511d6fca62f47ef8fd27968..1ae2e9d9a18c6a469d42a3f0e508a28bb0c55fb0 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -4104,6 +4104,18 @@ class ParameterElementImpl extends VariableElementImpl
*/
ParameterElementImpl.forNode(Identifier name) : super.forNode(name);
+ /**
+ * Creates a synthetic parameter with [name], [type] and [kind].
+ */
+ factory ParameterElementImpl.synthetic(String name, DartType type,
+ ParameterKind kind) {
+ ParameterElementImpl element = new ParameterElementImpl(name, -1);
+ element.type = type;
+ element.synthetic = true;
+ element.parameterKind = kind;
+ return element;
+ }
+
@override
String get defaultValueCode => _defaultValueCode;
« no previous file with comments | « pkg/analyzer/lib/dart/element/type.dart ('k') | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698