private void CheckAccessLevel()
        {
            bool accessable = true;

            if (Overload is IMethod asMethod)
            {
                if (!getter.AccessorMatches(asMethod))
                {
                    accessable = false;
                }
            }
            else if (!getter.AccessorMatches(scope, Overload.AccessLevel))
            {
                accessable = false;
            }

            if (!accessable)
            {
                parseInfo.Script.Diagnostics.Error(string.Format("'{0}' is inaccessable due to its access level.", Overload.GetLabel(false)), genericErrorRange);
            }
        }
        private void GetBestOption()
        {
            // If there are any methods with no errors, set that as the best option.
            var optionWithNoErrors = optionDiagnostics.FirstOrDefault(o => o.Value.Count == 0).Key;

            if (optionWithNoErrors != null)
            {
                Overload = optionWithNoErrors;
            }

            // Add the diagnostics of the best option.
            parseInfo.Script.Diagnostics.AddDiagnostics(optionDiagnostics[Overload].ToArray());

            // Check the access level.
            bool accessable = true;

            if (Overload is IMethod asMethod)
            {
                if (!getter.AccessorMatches(asMethod))
                {
                    accessable = false;
                }
            }
            else if (!getter.AccessorMatches(scope, Overload.AccessLevel))
            {
                accessable = false;
            }

            if (!accessable)
            {
                parseInfo.Script.Diagnostics.Error(string.Format("'{0}' is inaccessable due to its access level.", Overload.GetLabel(false)), genericErrorRange);
            }
        }