From 1d03522857645dce56852a65cb32dc8068aaebd1 Mon Sep 17 00:00:00 2001 From: Hixie Date: Wed, 9 Mar 2016 15:20:29 -0800 Subject: [PATCH] Remove the _EquationMember.hashCode override Since we removed our operator== overload, we can now allow people to put these in collections again. Also, turn on two more analyzer lints: avoid_empty_else and hash_and_equals. --- packages/cassowary/lib/equation_member.dart | 4 ---- packages/flutter_tools/.analysis_options | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/cassowary/lib/equation_member.dart b/packages/cassowary/lib/equation_member.dart index f5b4c1caf1..239cfc8ca2 100644 --- a/packages/cassowary/lib/equation_member.dart +++ b/packages/cassowary/lib/equation_member.dart @@ -24,8 +24,4 @@ abstract class _EquationMember { Expression operator *(_EquationMember m) => asExpression() * m; Expression operator /(_EquationMember m) => asExpression() / m; - - @override - int get hashCode => - throw "An equation member is not comparable and cannot be added to collections"; } diff --git a/packages/flutter_tools/.analysis_options b/packages/flutter_tools/.analysis_options index 9f03027963..66c6214907 100644 --- a/packages/flutter_tools/.analysis_options +++ b/packages/flutter_tools/.analysis_options @@ -13,6 +13,7 @@ analyzer: todo: ignore linter: rules: + - avoid_empty_else - always_declare_return_types # we'll turn on avoid_as as soon as it doesn't complain about "as dynamic" # - avoid_as @@ -20,6 +21,7 @@ linter: # sometimes we have no choice (e.g. when matching other platforms) # - constant_identifier_names - empty_constructor_bodies + - hash_and_equals # disabled until regexp fix is pulled in (https://github.com/flutter/flutter/pull/1996) # - library_names - library_prefixes