From 58c05afa87db7bf56056afc9e273c21af1f60f01 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 28 Sep 2012 18:15:49 +0400 Subject: [PATCH] Fix warnings and remove outdated code --- .../jetbrains/jet/lang/types/JetTypeImpl.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetTypeImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetTypeImpl.java index 948afa22411..24239d73d22 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetTypeImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetTypeImpl.java @@ -35,7 +35,7 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType { private final TypeConstructor constructor; private final List arguments; private final boolean nullable; - private JetScope memberScope; + private final JetScope memberScope; public JetTypeImpl(List annotations, TypeConstructor constructor, boolean nullable, @NotNull List arguments, JetScope memberScope) { super(annotations); @@ -82,10 +82,6 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType { @NotNull @Override public JetScope getMemberScope() { - if (memberScope == null) { - // TODO : this was supposed to mean something... - throw new IllegalStateException(this.toString()); - } return memberScope; } @@ -113,23 +109,14 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType { JetTypeImpl type = (JetTypeImpl) o; - // TODO return nullable == type.nullable && JetTypeChecker.INSTANCE.equalTypes(this, type); -// if (nullable != type.nullable) return false; -// if (arguments != null ? !arguments.equals(type.arguments) : type.arguments != null) return false; -// if (constructor != null ? !constructor.equals(type.constructor) : type.constructor != null) return false; -// if (memberScope != null ? !memberScope.equals(type.memberScope) : type.memberScope != null) return false; - -// return true; } @Override public int hashCode() { int result = constructor != null ? constructor.hashCode() : 0; - result = 31 * result + (arguments != null ? arguments.hashCode() : 0); + result = 31 * result + arguments.hashCode(); result = 31 * result + (nullable ? 1 : 0); return result; } - - }