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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1678313002: fix part of #25200, reject non-generic function subtype of generic function (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix synthetic ctor 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 | « no previous file | 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 4582 matching lines...) Expand 10 before | Expand all | Expand 10 after
4593 */ 4593 */
4594 DartType bound; 4594 DartType bound;
4595 4595
4596 /** 4596 /**
4597 * Initialize a newly created method element to have the given [name] and 4597 * Initialize a newly created method element to have the given [name] and
4598 * [offset]. 4598 * [offset].
4599 */ 4599 */
4600 TypeParameterElementImpl(String name, int offset) : super(name, offset); 4600 TypeParameterElementImpl(String name, int offset) : super(name, offset);
4601 4601
4602 /** 4602 /**
4603 * Initialize a newly created synthetic type parameter element to have the
4604 * given [name], and with [synthetic] set to true.
4605 */
4606 TypeParameterElementImpl.synthetic(String name) : super(name, -1) {
4607 synthetic = true;
4608 }
4609
4610 /**
4603 * Initialize a newly created type parameter element to have the given [name]. 4611 * Initialize a newly created type parameter element to have the given [name].
4604 */ 4612 */
4605 TypeParameterElementImpl.forNode(Identifier name) : super.forNode(name); 4613 TypeParameterElementImpl.forNode(Identifier name) : super.forNode(name);
4606 4614
4607 @override 4615 @override
4608 ElementKind get kind => ElementKind.TYPE_PARAMETER; 4616 ElementKind get kind => ElementKind.TYPE_PARAMETER;
4609 4617
4610 @override 4618 @override
4611 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this); 4619 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this);
4612 4620
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
4783 4791
4784 @override 4792 @override
4785 void visitElement(Element element) { 4793 void visitElement(Element element) {
4786 int offset = element.nameOffset; 4794 int offset = element.nameOffset;
4787 if (offset != -1) { 4795 if (offset != -1) {
4788 map[offset] = element; 4796 map[offset] = element;
4789 } 4797 }
4790 super.visitElement(element); 4798 super.visitElement(element);
4791 } 4799 }
4792 } 4800 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698