Ejemplo n.º 1
0
		private GenericParameter ResolveTypeParameterName(Name name, PhpType referringType, PhpRoutine referringRoutine)
		{
			GenericParameter result = null;

			if (referringRoutine != null)
			{
				result = referringRoutine.Signature.GetGenericParameter(name);
				if (result != null)
					return result;
			}

			if (referringType != null)
			{
				result = referringType.GetGenericParameter(name);
				if (result != null)
					return result;
			}

			return result;
		}
Ejemplo n.º 2
0
		internal void PreAnalyze(Analyzer/*!*/ analyzer, PhpType/*!*/ declaringType)
		{
			Debug.Assert(analyzer != null && declaringType != null);

			if (typeParams == null) return;

			Debug.Assert(declaringType.GenericParams.Length == typeParams.Count);

			for (int i = 0; i < typeParams.Count; i++)
				typeParams[i].PreAnalyze(analyzer, declaringType.GetGenericParameter(i));
		}