* @param accessType - one of Lenient or Strict.
* @param result - the instruction sequence to generate into.
*/
void generateAccess(Binding binding, final boolean is_super, AccessType accessType, InstructionList result)
{
final Name name = binding.getName();
assert (name != null) : "binding must have a name when calling generateAccess()";
final IASNode node = binding.getNode();
if ( name.isTypeName() )
{
// a type names node should always be a ITypedExpressionNode
ITypedExpressionNode typeNode = (ITypedExpressionNode)node;
IExpressionNode collectionNode = typeNode.getCollectionNode();
IDefinition collectionDefinition = SemanticUtils.getDefinition(collectionNode, currentScope.getProject());
Binding collectionBinding = currentScope.getBinding(collectionNode, name.getTypeNameBase(), collectionDefinition);
generateAccess(collectionBinding, is_super, AccessType.Strict, result);
IExpressionNode typeTypeNode = typeNode.getTypeNode();
IDefinition typeDefinition = SemanticUtils.getDefinition(typeTypeNode, currentScope.getProject());
Binding typeBinding = currentScope.getBinding(typeTypeNode, name.getTypeNameParameter(), typeDefinition);
generateTypeNameParameter(typeBinding, result);
result.addInstruction(OP_applytype, 1);
}
else