Skip to content

Commit

Permalink
Annotate return types as immutable interfaces
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197658314
  • Loading branch information
blickly authored and brad4d committed May 23, 2018
1 parent dce856f commit 3c8d3e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/google/javascript/rhino/jstype/FunctionType.java
Expand Up @@ -577,7 +577,7 @@ public final Collection<ObjectType> getAncestorInterfaces() {
} }


/** Returns interfaces implemented directly by a class or its superclass. */ /** Returns interfaces implemented directly by a class or its superclass. */
public final Iterable<ObjectType> getImplementedInterfaces() { public final ImmutableList<ObjectType> getImplementedInterfaces() {
FunctionType superCtor = isConstructor() ? getSuperClassConstructor() : null; FunctionType superCtor = isConstructor() ? getSuperClassConstructor() : null;
if (superCtor == null) { if (superCtor == null) {
return implementedInterfaces; return implementedInterfaces;
Expand All @@ -592,7 +592,7 @@ public final Iterable<ObjectType> getImplementedInterfaces() {
} }


/** Returns interfaces directly implemented by the class. */ /** Returns interfaces directly implemented by the class. */
public final Iterable<ObjectType> getOwnImplementedInterfaces() { public final ImmutableList<ObjectType> getOwnImplementedInterfaces() {
return implementedInterfaces; return implementedInterfaces;
} }


Expand All @@ -610,7 +610,7 @@ public final void setImplementedInterfaces(List<ObjectType> implementedInterface
} }


/** Returns interfaces directly extended by an interface */ /** Returns interfaces directly extended by an interface */
public final Iterable<ObjectType> getExtendedInterfaces() { public final ImmutableList<ObjectType> getExtendedInterfaces() {
return extendedInterfaces; return extendedInterfaces;
} }


Expand Down

0 comments on commit 3c8d3e9

Please sign in to comment.