dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

[trimming] Failing tests with trimming - Microsoft.VisualBasic.Core.Tests #51834

Open radical opened 3 years ago

radical commented 3 years ago

Failing tests:

Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F2", arguments: [1, -1], typeArguments: null, expectedValue: "System.Int32, 1, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F3", arguments: [1, 2, -1], typeArguments: null, expectedValue: "System.Int32, 2, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F4", arguments: [1, 2, 3, -1], typeArguments: null, expectedValue: "System.Int32, 3, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F5", arguments: [1, 2, 3, 4, -1], typeArguments: null, expectedValue: "System.Int32, 4, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F6", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 5, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F7", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 6, -1")
Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F8", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 7, -1")

.. failing with errors like:

[10:34:43] fail: [FAIL] Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F2", arguments: [1, -1], typeArguments: null, expectedValue: "System.Int32, 1, -1")
[10:34:43] info: System.InvalidCastException : Overload resolution failed because no Public 'F2' can be called with these arguments:
[10:34:43] info:     'Public Function F2(Of Integer)([p1 As Integer = Nothing], [p2 As System.Nullable(Of Integer) = 2]) As System.Object':
[10:34:43] info:         Argument matching parameter 'p2' cannot convert from 'Integer' to 'Nullable(Of Integer)'.
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.OverloadResolution.ResolveOverloadedCall(String methodName, List`1 candidates, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.OverloadResolution.ResolveOverloadedCall(String methodName, MemberInfo[] members, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure, Container baseReference)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ResolveCall(Container baseReference, String methodName, MemberInfo[] members, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container baseReference, String methodName, Object[] arguments, String[] argumentNames, Type[] typeArguments, Boolean[] copyBack, BindingFlags invocationFlags, Boolean reportErrors, ResolutionFailure& failure)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object instance, Type type, String memberName, Object[] arguments, String[] argumentNames, Type[] typeArguments, Boolean[] copyBack, Boolean ignoreReturn)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.FallbackCall(Object Instance, String MemberName, Object[] Arguments, String[] ArgumentNames, Boolean IgnoreReturn)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.IDOUtils.CreateRefCallSiteAndInvoke(CallSiteBinder action, Object instance, Object[] arguments)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.IDOBinder.IDOCall(IDynamicMetaObjectProvider instance, String memberName, Object[] arguments, String[] argumentNames, Boolean[] copyBack, Boolean ignoreReturn)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
[10:34:43] info:    at Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(String memberName, Object[] arguments, Type[] typeArguments, String expectedValue)
[10:34:43] info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
ghost commented 3 years ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
[Log](https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-51697-merge-d7050d97e17f4af48c/Microsoft.VisualBasic.Core.Tests/console.7920b38b.log?sv=2019-07-07&se=2021-05-14T10%3A12%3A51Z&sr=c&sp=rl&sig=joFjNEgxpTnETLo%2BQpy0GG9W3JRhjUYwDz51sJW1Qcs%3D) Failing tests: ``` Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F2", arguments: [1, -1], typeArguments: null, expectedValue: "System.Int32, 1, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F3", arguments: [1, 2, -1], typeArguments: null, expectedValue: "System.Int32, 2, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F4", arguments: [1, 2, 3, -1], typeArguments: null, expectedValue: "System.Int32, 3, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F5", arguments: [1, 2, 3, 4, -1], typeArguments: null, expectedValue: "System.Int32, 4, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F6", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 5, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F7", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 6, -1") Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F8", arguments: [1, 2, 3, 4, 5, ...], typeArguments: null, expectedValue: "System.Int32, 7, -1") ``` .. failing with errors like: ``` [10:34:43] fail: [FAIL] Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(memberName: "F2", arguments: [1, -1], typeArguments: null, expectedValue: "System.Int32, 1, -1") [10:34:43] info: System.InvalidCastException : Overload resolution failed because no Public 'F2' can be called with these arguments: [10:34:43] info: 'Public Function F2(Of Integer)([p1 As Integer = Nothing], [p2 As System.Nullable(Of Integer) = 2]) As System.Object': [10:34:43] info: Argument matching parameter 'p2' cannot convert from 'Integer' to 'Nullable(Of Integer)'. [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.OverloadResolution.ResolveOverloadedCall(String methodName, List`1 candidates, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.OverloadResolution.ResolveOverloadedCall(String methodName, MemberInfo[] members, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure, Container baseReference) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ResolveCall(Container baseReference, String methodName, MemberInfo[] members, Object[] arguments, String[] argumentNames, Type[] typeArguments, BindingFlags lookupFlags, Boolean reportErrors, ResolutionFailure& failure) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container baseReference, String methodName, Object[] arguments, String[] argumentNames, Type[] typeArguments, Boolean[] copyBack, BindingFlags invocationFlags, Boolean reportErrors, ResolutionFailure& failure) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object instance, Type type, String memberName, Object[] arguments, String[] argumentNames, Type[] typeArguments, Boolean[] copyBack, Boolean ignoreReturn) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.NewLateBinding.FallbackCall(Object Instance, String MemberName, Object[] Arguments, String[] ArgumentNames, Boolean IgnoreReturn) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.IDOUtils.CreateRefCallSiteAndInvoke(CallSiteBinder action, Object instance, Object[] arguments) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.IDOBinder.IDOCall(IDynamicMetaObjectProvider instance, String memberName, Object[] arguments, String[] argumentNames, Boolean[] copyBack, Boolean ignoreReturn) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn) [10:34:43] info: at Microsoft.VisualBasic.CompilerServices.Tests.NewLateBindingTests.LateCall_OptionalValues(String memberName, Object[] arguments, Type[] typeArguments, String expectedValue) [10:34:43] info: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ```
Author: radical
Assignees: -
Labels: `arch-wasm`, `area-Microsoft.VisualBasic`, `trimming-for-aot`
Milestone: -