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
{
// Test whether we're refering to the class being initialized, for example:
// public class C {
// private static var v:Vector.<C> = new Vector.<C>();
// }
// as in this case we need to do a getlocal0 as the class
// hasn't been initialized yet
boolean useLocal0 = false;
if (node instanceof IdentifierNode)
{
IdentifierNode id = (IdentifierNode)node;
IDefinition def = id.resolve(currentScope.getProject());
if (SemanticUtils.isRefToClassBeingInited(id, def) && !currentScope.insideInlineFunction())
useLocal0 = true;
}
// TODO: use getslot when we can.