// introduce redundant storey but with `this' only but it's tricky to avoid
// at this stage as we don't know what expressions follow base
//
+ // TODO: It's needed only when the method with base call is moved to a storey
+ //
if (rc.CurrentAnonymousMethod != null) {
if (targs == null && method.IsGeneric) {
targs = method.TypeArguments;
//
// A candidate with no default parameters is still better when there
- // is no better expression conversion
+ // is no better expression conversion and does not have more parameters
//
if (candidate_pd.Count < best_pd.Count) {
- if (!candidate_params && !candidate_pd.FixedParameters [j - j].HasDefaultValue) {
+ if (candidate_params)
+ return false;
+
+ if (!candidate_pd.FixedParameters [j - 1].HasDefaultValue)
return true;
- }
+
+ if (best_pd.FixedParameters [j].HasDefaultValue)
+ return true;
+
} else if (candidate_pd.Count == best_pd.Count) {
if (candidate_params)
return false;
// The slot has been taken by positional argument
if (temp != null && !(temp is NamedArgument))
- break;
+ return NamedArgumentsMismatch - i - 1;
}
if (!arg_moved) {
if ((fp.ModFlags & Parameter.Modifier.CallerLineNumber) != 0) {
e = new IntLiteral (ec.BuiltinTypes, loc.Row, loc);
} else if ((fp.ModFlags & Parameter.Modifier.CallerFilePath) != 0) {
- e = new StringLiteral (ec.BuiltinTypes, loc.NameFullPath, loc);
+ e = new StringLiteral (ec.BuiltinTypes, loc.SourceFile.GetFullPathName (ec.Module.Compiler.Settings.PathMap), loc);
} else if (ec.MemberContext.CurrentMemberDefinition != null) {
e = new StringLiteral (ec.BuiltinTypes, ec.MemberContext.CurrentMemberDefinition.GetCallerMemberName (), loc);
}
public override void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound)
{
if (backing_field != null) {
- backing_field.EmitAssign (ec, source, false, false);
+ backing_field.EmitAssign (ec, source, leave_copy, false);
return;
}