Replies: 1 comment
-
Closing out as this appears to be a language request. Those go to dotnet/csharplang. I tried moving the discussion, but GitHub wouldn't let me. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make a method that return
delegate* unmanaged<T, T1, ..., TOut>
and accept a method. I'm tired of writing every time for methodTOut Meth(T, T1, ...)
castes indelegate* unmanaged<T, T1, ..., TOut>
, like:I trying make:
But I get error: The type arguments for method 'ldftn<T, T2, TOut>(Func<T, T2, TOut>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
I can fix this by defining a generic type when calling:
BUT IF I DEFINE WRONG GENERICS, THEN AN ERROR CS0407 WILL COME UP:
THAT THE Meth METHOD HAS THE WRONG ARGUMENTS OR RETURN TYPE, THAT IS, THE COMPILER KNOWS WHAT ARGUMENTS METH HAS AND IT WOULD BE LOGICAL THAT I DIDN’T WRITE THE GENERICS MYSELF.
Beta Was this translation helpful? Give feedback.
All reactions