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

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

Issue 1673873003: Remove some unneeded getters. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/type.dart
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 568ac91b4063b427117a02f3592fb4836f675d01..d3a53182cc5ca10e5069fb1e1121037732a993ce 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -29,12 +29,7 @@ class BottomTypeImpl extends TypeImpl {
/**
* The unique instance of this class.
*/
- static BottomTypeImpl _INSTANCE = new BottomTypeImpl._();
-
- /**
- * Return the unique instance of this class.
- */
- static BottomTypeImpl get instance => _INSTANCE;
+ static final BottomTypeImpl instance = new BottomTypeImpl._();
/**
* Prevent the creation of instances of this class.
@@ -136,12 +131,7 @@ class DynamicTypeImpl extends TypeImpl {
/**
* The unique instance of this class.
*/
- static DynamicTypeImpl _INSTANCE = new DynamicTypeImpl._();
-
- /**
- * Return the unique instance of this class.
- */
- static DynamicTypeImpl get instance => _INSTANCE;
+ static final DynamicTypeImpl instance = new DynamicTypeImpl._();
/**
* Prevent the creation of instances of this class.
@@ -155,7 +145,7 @@ class DynamicTypeImpl extends TypeImpl {
* Constructor used by [CircularTypeImpl].
*/
DynamicTypeImpl._circular()
- : super(_INSTANCE.element, Keyword.DYNAMIC.syntax);
+ : super(instance.element, Keyword.DYNAMIC.syntax);
@override
int get hashCode => 1;
@@ -2360,12 +2350,7 @@ class UndefinedTypeImpl extends TypeImpl {
/**
* The unique instance of this class.
*/
- static UndefinedTypeImpl _INSTANCE = new UndefinedTypeImpl._();
-
- /**
- * Return the unique instance of this class.
- */
- static UndefinedTypeImpl get instance => _INSTANCE;
+ static final UndefinedTypeImpl instance = new UndefinedTypeImpl._();
/**
* Prevent the creation of instances of this class.
@@ -2435,17 +2420,12 @@ class VoidTypeImpl extends TypeImpl implements VoidType {
/**
* The unique instance of this class.
*/
- static VoidTypeImpl _INSTANCE = new VoidTypeImpl();
-
- /**
- * Return the unique instance of this class.
- */
- static VoidTypeImpl get instance => _INSTANCE;
+ static final VoidTypeImpl instance = new VoidTypeImpl._();
/**
* Prevent the creation of instances of this class.
*/
- VoidTypeImpl() : super(null, Keyword.VOID.syntax);
+ VoidTypeImpl._() : super(null, Keyword.VOID.syntax);
@override
int get hashCode => 2;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698