CSE.Exps.MethodExp.CanCoerce C# (CSharp) Method

CanCoerce() private static method

Determines if it is possible to coerce the given list of arguments so a method signature can be matched.
private static CanCoerce ( List args ) : bool
args List List of arguments to check
return bool
		private static bool CanCoerce(List<CseObject> args) {
			if (args == null)
				return false;

			bool foundIntType = false;
			bool canCoerce = false;

			for (int i = 0; i < args.Count; i++) {
				CseObject arg = args[i];

				if (LiteralExp.IsIntType(arg)) {
					if (!foundIntType) {
						canCoerce = true;
						foundIntType = true;
					}
					else {
						canCoerce = false;
						break;
					}
				}
			}

			return canCoerce;
		}