Replies: 2 comments
-
First one is missing constraint or specific type. It should include it for type parameter. There's still no auto-inferring for constraints, and likely will never be. Second one is missing type parameter on type itself. Examples are wrong. |
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
-
According to the F# 8 announcement at https://devblogs.microsoft.com/dotnet/announcing-fsharp-8/,
The same syntax can be used to define accessors via SRTP syntax, allowing the same binding to be used by all items having the same member, without the need to share a common interface.
However, when I try this, I get a type error: Lookup on object of indeterminate type based on information prior to this program point.
Similarly, when I try the static let example:
I get error FS0039: The type parameter 'A is not defined.
Is the blog post wrong or am I doing something wrong? Other F# 8 features like try/with within seq expressions work fine.
Beta Was this translation helpful? Give feedback.
All reactions