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
Compile the below snippet using csc /out:foo.exe /target:exe /langversion:5 foo.cs
using System;using System.Threading.Tasks;namespaceBlarg{classProgram{staticvoidMain(string[]args){Create<string>(async blah =>{while(true){ Console.WriteLine("foo.");}});}publicstaticvoidCreate<TResult>(Func<IObserver<TResult>,Task>subscribeAsync){}publicstaticvoidCreate<TResult>(Func<IObserver<TResult>,Task<Action>>subscribeAsync){}}}
Expected Behavior: Compilation fails with an overload ambiguity error. It appears that the langversion does not affect the improvements to overload resolution that were introduced in C# 6.
Actual Behavior: Compilation succeeds.
The text was updated successfully, but these errors were encountered:
Version Used:
csc 1.1.0.51109
Steps to Reproduce:
csc /out:foo.exe /target:exe /langversion:5 foo.cs
Expected Behavior: Compilation fails with an overload ambiguity error. It appears that the
langversion
does not affect the improvements to overload resolution that were introduced in C# 6.Actual Behavior: Compilation succeeds.
The text was updated successfully, but these errors were encountered: