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

No errors for non-virtual members overrides #14263

Merged

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Nov 8, 2022

Fixes #11456

Reuses error 855, tcNoMemberFoundForOverride,"No abstract or interface member was found that corresponds to this override" for consistency.

But a clearer message would be
'C.M2': cannot override inherited member 'B.M2' because it is not marked virtual, abstract, or override."

  • This will need to be a new error message
  • Virtual is not used in F# and in this case refers to C#. So might be confusing
  • It will require some string manipulation to get the type name, member name from the declaring type and the inherited type

@edgarfgp edgarfgp requested a review from a team as a code owner November 8, 2022 06:30
@vzarytovskii
Copy link
Member

vzarytovskii commented Nov 8, 2022

Nice, thanks. If this was compiling before, this will need to go under language version flag.

@edgarfgp
Copy link
Contributor Author

edgarfgp commented Nov 8, 2022

@vzarytovskii Any idea why the CI is failing with error FS0073: (NETCORE_ENGINEERING_TELEMETRY=Build) internal error: not a .NET type definition (Failure)

I will add a preview language flag

@vzarytovskii
Copy link
Member

@vzarytovskii Vlad Zarytovskii FTE Any idea why the CI is failing with error FS0073: (NETCORE_ENGINEERING_TELEMETRY=Build) internal error: not a .NET type definition (Failure)

Erm, never seen it before, let me look if it's related to changes.

@vzarytovskii
Copy link
Member

So, the error thrown in the Proto compiler, so it's likely related to the change:

/// Get the Abstract IL scope, nesting and metadata for this 
/// type definition, assuming it is backed by Abstract IL metadata.
member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith "not a .NET type definition"

@edgarfgp
Copy link
Contributor Author

edgarfgp commented Nov 8, 2022

So, the error thrown in the Proto compiler, so it's likely related to the change:

/// Get the Abstract IL scope, nesting and metadata for this 
/// type definition, assuming it is backed by Abstract IL metadata.
member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith "not a .NET type definition"

Thanks, will look into it.

@edgarfgp
Copy link
Contributor Author

@vzarytovskii it is green now 😀

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

Successfully merging this pull request may close these issues.

No errors for non-virtual NewSlot members overrides
3 participants