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

Native integer types from source should be preserved on override #44358

Closed
333fred opened this issue May 18, 2020 · 0 comments · Fixed by #47536
Closed

Native integer types from source should be preserved on override #44358

333fred opened this issue May 18, 2020 · 0 comments · Fixed by #47536

Comments

@333fred
Copy link
Member

333fred commented May 18, 2020

Today we copy over tuple and dynamic modifiers from source on override, but we do not copy over native integer modifiers. This causes an assert to fire in the compiler for this code:

class Base { public virtual nint[] M1() => throw null; }
class Derived : Base { public override System.IntPtr[] M1() => throw null; }

It should probably warn or error.

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

Successfully merging a pull request may close this issue.

3 participants