InvokableReferenceTypeUsage implements TypeUsage, Invokable { @Override public Invokable asInvokable() { return this; } InvokableReferenceTypeUsage(InternalInvokableDefinition internalInvokableDefinition); @Override TypeUsage replaceTypeVariables(Map<String, T> typeParams); @Override boolean sameType(TypeUsage other); @Override boolean isInvokable(); @Override Invokable asInvokable(); @Override JvmType jvmType(); @Override boolean hasInstanceField(String fieldName, Symbol instance); @Override Symbol getInstanceField(String fieldName, Symbol instance); @Override Optional<Invokable> getMethod(String method, boolean staticContext); @Override boolean canBeAssignedTo(TypeUsage type); @Override boolean isOverloaded(); @Override Optional<InternalInvokableDefinition> internalInvokableDefinitionFor(List<ActualParam> actualParams); @Override String describe(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testAsInvokable() { assertTrue(invokableA == invokableA.asInvokable()); assertTrue(invokableB == invokableB.asInvokable()); assertTrue(invokableC == invokableC.asInvokable()); assertTrue(invokableD == invokableD.asInvokable()); }