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

Side by Side 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, 10 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 4086 matching lines...) Expand 10 before | Expand all | Expand 10 after
4097 * Initialize a newly created parameter element to have the given [name] and 4097 * Initialize a newly created parameter element to have the given [name] and
4098 * [offset]. 4098 * [offset].
4099 */ 4099 */
4100 ParameterElementImpl(String name, int nameOffset) : super(name, nameOffset); 4100 ParameterElementImpl(String name, int nameOffset) : super(name, nameOffset);
4101 4101
4102 /** 4102 /**
4103 * Initialize a newly created parameter element to have the given [name]. 4103 * Initialize a newly created parameter element to have the given [name].
4104 */ 4104 */
4105 ParameterElementImpl.forNode(Identifier name) : super.forNode(name); 4105 ParameterElementImpl.forNode(Identifier name) : super.forNode(name);
4106 4106
4107 /**
4108 * Creates a synthetic parameter with [name], [type] and [kind].
4109 */
4110 factory ParameterElementImpl.synthetic(String name, DartType type,
4111 ParameterKind kind) {
4112 ParameterElementImpl element = new ParameterElementImpl(name, -1);
4113 element.type = type;
4114 element.synthetic = true;
4115 element.parameterKind = kind;
4116 return element;
4117 }
4118
4107 @override 4119 @override
4108 String get defaultValueCode => _defaultValueCode; 4120 String get defaultValueCode => _defaultValueCode;
4109 4121
4110 /** 4122 /**
4111 * Set Dart code of the default value. 4123 * Set Dart code of the default value.
4112 */ 4124 */
4113 void set defaultValueCode(String defaultValueCode) { 4125 void set defaultValueCode(String defaultValueCode) {
4114 this._defaultValueCode = StringUtilities.intern(defaultValueCode); 4126 this._defaultValueCode = StringUtilities.intern(defaultValueCode);
4115 } 4127 }
4116 4128
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
4756 4768
4757 @override 4769 @override
4758 void visitElement(Element element) { 4770 void visitElement(Element element) {
4759 int offset = element.nameOffset; 4771 int offset = element.nameOffset;
4760 if (offset != -1) { 4772 if (offset != -1) {
4761 map[offset] = element; 4773 map[offset] = element;
4762 } 4774 }
4763 super.visitElement(element); 4775 super.visitElement(element);
4764 } 4776 }
4765 } 4777 }
OLDNEW
« 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