Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Versioned / Overloaded functions #1896

Open
pmpurifoy opened this issue Jan 14, 2025 · 0 comments
Open

Handle Versioned / Overloaded functions #1896

pmpurifoy opened this issue Jan 14, 2025 · 0 comments

Comments

@pmpurifoy
Copy link

Description

If a WinRT class has a versioned / overloaded function, generating the projections results in error CS0540. The projection should be able to properly handle this scenario.

Sample input:
runtimeclass MyClass
{
[contract(MyClassContract, 1.0)]
{
void ReportResult(UInt32 itemIndex, Boolean isAccurate);
}
[contract(MyClassContract, 1.1)]
{
void ReportResult(UInt32 itemIndex, Int32 isAccurate);
}
}

Sample output:
error CS0540 'MyClass.IMyClass2.ReportResult(uint, Int32)': containing type does not implement interface 'IMyClass2'

@manodasanW was able to provide workaround but filing bug for future.

Steps To Reproduce

  1. Write an idl with overloaded functions that are versioned.
  2. Use CsWinRT to generate the projections
  3. Warning will be visible in the output with error CS0540

Expected Behavior

No warning should be provided after building the projections.

Version Info

CsWinRT version: 2.2.0

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant