You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vara=newDifferentAssembly(....);varb=newDifferentAssembly(....);// pass by value. No error.Console.WriteLine(a+b);// pass by ref readonly.// No error in the Visual Studio C# Editor// but error on build.Console.WriteLine(a*b);
Expected Behavior:
successfully compiled
Actual Behavior:
There is no error in the Visual Studio C# Editor, but error on build.
The text was updated successfully, but these errors were encountered:
Do you get a different behavior if the struct is declared in the same project/compilation?
@OmarTawfikrecently fixed this scenario so that the by-val overload will be preferred in ambiguous situation. This fix is in master and should be available in 15.6 preview 2 (not yet released).
Test PassingInArgumentsOverloadedOnIn_BinaryOperators is close to what you describe, but within one compilation.
Yes. 15.5 didn't allow operators from other assemblies to be imported. #23508 fixed that (merged to master).
You can confirm quickly by either declaring your operators in the same assembly (should make the error go away), or trying the latest compiler from master, which should import the operator from the other assembly.
Version Used:
VS 15.5.0
Steps to Reproduce:
https://github.com/ufcpp/UfcppSample/tree/master/Demo/2017/InOperatorDifferentAssemly
Expected Behavior:
successfully compiled
Actual Behavior:
There is no error in the Visual Studio C# Editor, but error on build.
The text was updated successfully, but these errors were encountered: