-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
Milestone
Description
func foo[T any](param T) {
if param == nil {
// do a thing
}
}
This is invalid
invalid operation: cannot compare param == nil (mismatched types T and untyped nil)
Would be nice to have a nullable constraint so that the following could be done
func foo[T Nullable](param T) {
if param == nil {
// do a thing
}
}
Jorropo, Helyk, leaxoy, rainliu, bep and 71 morevalyala, seankhliao and earthboundkidseptemhill and ericlagergren
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Incoming