Merge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile
[mono.git] / mcs / mcs / ecore.cs
index edc860eca83b595e90b61975654147dbd691c4e9..ad4faf3ce242d67a81f170f9c4620b757e438fac 100644 (file)
@@ -4784,7 +4784,7 @@ namespace Mono.CSharp {
                                // is no better expression conversion
                                //
                                if (candidate_pd.Count < best_pd.Count) {
-                                       if (!candidate_params && !candidate_pd.FixedParameters [j - j].HasDefaultValue) {
+                                       if (!candidate_params && !candidate_pd.FixedParameters [j - 1].HasDefaultValue) {
                                                return true;
                                        }
                                } else if (candidate_pd.Count == best_pd.Count) {
@@ -5050,7 +5050,7 @@ namespace Mono.CSharp {
 
                                                                // The slot has been taken by positional argument
                                                                if (temp != null && !(temp is NamedArgument))
-                                                                       break;
+                                                                       return NamedArgumentsMismatch - i - 1;
                                                        }
 
                                                        if (!arg_moved) {
@@ -5222,7 +5222,7 @@ namespace Mono.CSharp {
                                                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);
                                                }