Skip to content

Commit 8ac00c8

Browse files
authored
Fix exception and simplify inheritance (#2214)
1 parent 3c44922 commit 8ac00c8

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

lib/src/model/method.dart

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:analyzer/dart/element/element.dart';
66
import 'package:analyzer/source/line_info.dart';
77
import 'package:analyzer/src/dart/element/member.dart' show Member;
8-
import 'package:dartdoc/src/element_type.dart';
98
import 'package:dartdoc/src/model/model.dart';
109

1110
class Method extends ModelElement
@@ -95,9 +94,6 @@ class Method extends ModelElement
9594

9695
String get linkedReturnType => modelType.createLinkedReturnTypeName();
9796

98-
@override
99-
DefinedElementType get modelType => super.modelType;
100-
10197
@override
10298
Method get overriddenElement {
10399
if (_enclosingContainer is Extension) {

lib/src/model/type_parameter.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class TypeParameter extends ModelElement {
6969
TypeParameterElement get _typeParameter => element as TypeParameterElement;
7070
}
7171

72-
abstract class TypeParameters implements ModelElement {
72+
mixin TypeParameters implements ModelElement {
7373
String get nameWithGenerics => '$name$genericParameters';
7474

7575
String get nameWithLinkedGenerics => '$name$linkedGenericParameters';
@@ -82,9 +82,6 @@ abstract class TypeParameters implements ModelElement {
8282
String get linkedGenericParameters =>
8383
_typeParametersRenderer.renderLinkedGenericParameters(this);
8484

85-
@override
86-
DefinedElementType get modelType;
87-
8885
List<TypeParameter> get typeParameters;
8986

9087
TypeParametersRenderer get _typeParametersRenderer =>

0 commit comments

Comments
 (0)