public ErrorType GetErrorType( CType pParentType, AssemblyQualifiedNamespaceSymbol pParentNS, Name nameText, TypeArray typeArgs) { Debug.Assert(nameText != null); Debug.Assert(pParentType == null || pParentNS == null); if (pParentType == null && pParentNS == null) { // Use the root namespace as the parent. pParentNS = _BSymmgr.GetRootNsAid(); } if (typeArgs == null) { typeArgs = BSYMMGR.EmptyTypeArray(); } Name name = _BSymmgr.GetNameFromPtrs(nameText, typeArgs); Debug.Assert(name != null); ErrorType pError = null; if (pParentType != null) { pError = _typeTable.LookupError(name, pParentType); } else { Debug.Assert(pParentNS != null); pError = _typeTable.LookupError(name, pParentNS); } if (pError == null) { // No existing error symbol. Create a new one. pError = _typeFactory.CreateError(name, pParentType, pParentNS, nameText, typeArgs); pError.SetErrors(true); if (pParentType != null) { _typeTable.InsertError(name, pParentType, pError); } else { _typeTable.InsertError(name, pParentNS, pError); } } else { Debug.Assert(pError.HasErrors()); Debug.Assert(pError.nameText == nameText); Debug.Assert(pError.typeArgs == typeArgs); } return(pError); }