Skip to content

Commit

Permalink
Address PR feedback:
Browse files Browse the repository at this point in the history
1. Simplify the parameter/return requirements.
2. Clarify the intent around invalid imported metadata.
  • Loading branch information
333fred committed Aug 26, 2020
1 parent 55df4c7 commit 3e179c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions proposals/csharp-9.0/function-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,9 @@ the attribute:
* It is an error to directly call a method annotated with this attribute from C#. Users must obtain a function pointer to
the method and then invoke that pointer.
* It is an error to apply the attribute to anything other than an ordinary static method or ordinary static local function.
The C# compiler will mark any non-static methods imported from metadata with this attribute as unsupported by the language.
* It is an error to have managed types as parameters or the return type of a method marked with the attribute. If the parameter
or return types are unmanaged except for generic type parameters, they are only allowed if those parameters are substituted
with unmanaged types themselves.
The C# compiler will mark any non-static or static non-ordinary methods imported from metadata with this attribute as
unsupported by the language.
* It is an error for a method marked with the attribute to have a parameter or return type that is not an `unmanaged_type`.
* It is an error for a method marked with the attribute to have type parameters, even if those type parameters are
constrained to `unmanaged`.
* It is an error for a method in a generic type to be marked with the attribute.
Expand Down

0 comments on commit 3e179c0

Please sign in to comment.