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
error C2665: 'winrt::_5_Function_Template_Conflict_WinUI3::implementation::MyClass2::MyProperty': no overloaded function could convert all the argument types
1>(compiling source file '/MyClass2.cpp')
1>C:\Users\Peter\Desktop\WinUI-Bug\5-Function-Template-Conflict\5-Function-Template-Conflict-WinUI3\MyClass2.cpp(14,20):
1>could be 'void winrt::_5_Function_Template_Conflict_WinUI3::implementation::MyClass2::MyProperty(int32_t)'
1> C:\Users\Peter\Desktop\WinUI-Bug\5-Function-Template-Conflict\5-Function-Template-Conflict-WinUI3\Generated Files\winrt\_5_Function_Template_Conflict_WinUI3.h(94,25):
1> 'void winrt::_5_Function_Template_Conflict_WinUI3::implementation::MyClass2::MyProperty(int32_t)': cannot convert argument 1 from 'const winrt::Windows::Foundation::IInspectable' to 'int32_t'
1> C:\Users\Peter\Desktop\WinUI-Bug\5-Function-Template-Conflict\5-Function-Template-Conflict-WinUI3\Generated Files\winrt\_5_Function_Template_Conflict_WinUI3.h(94,37):
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
It looks like your repro specifies Object MyProperty; as the property in the idl file but still specifies int32_t as the type in the .h and .cpp files:
My bad. I have updated the code, and it seems this issue does get fixed for WinUI3. And UWP's issue remains. Please also take a look at #8994 if possible, thanks!
Describe the bug
Same with #8994, but WinUI3 C++ project gives a different error.
Steps to reproduce the bug
Create a C++ WinUI3 project
Update every nuget to latest, I have
Create two runtimeclass
Repo here
Expected behavior
Builds fine
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.0: 1.5.240227000
Windows version
Windows 10 (1809): Build 17763
Additional context
No response
The text was updated successfully, but these errors were encountered: