Skip to content

Commit

Permalink
Correct translation failure message (#21408)
Browse files Browse the repository at this point in the history
  • Loading branch information
roji authored Aug 21, 2020
1 parent dd43bbc commit b6877e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,8 @@ protected override Expression VisitMethodCall(MethodCallExpression methodCallExp
else
{
AddTranslationErrorDetails(CoreStrings.QueryUnableToTranslateMethod(
methodCallExpression.Method.Name,
methodCallExpression.Method.DeclaringType?.DisplayName()));
methodCallExpression.Method.DeclaringType?.DisplayName(),
methodCallExpression.Method.Name));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,8 @@ static bool IsAggregateResultWithCustomShaper(MethodInfo method)
else
{
AddTranslationErrorDetails(CoreStrings.QueryUnableToTranslateMethod(
methodCallExpression.Method.Name,
methodCallExpression.Method.DeclaringType?.DisplayName()));
methodCallExpression.Method.DeclaringType?.DisplayName(),
methodCallExpression.Method.Name));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5620,11 +5620,11 @@ public virtual Task Client_code_unknown_method(bool async)
async,
ss => ss.Set<Customer>().Where(c => UnknownMethod(c.ContactName) == "foo")),
CoreStrings.QueryUnableToTranslateMethod(
nameof(UnknownMethod),
GetType().GetMethod(
nameof(UnknownMethod),
BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
?.DeclaringType?.DisplayName()));
?.DeclaringType?.DisplayName(),
nameof(UnknownMethod)));
}

public static string UnknownMethod(string foo) => foo;
Expand Down

0 comments on commit b6877e7

Please sign in to comment.