Join Slack
Powered by
When overriding a function with a nullable return ...
# getting-started
m
Mark
04/10/2021, 4:44 AM
When overriding a function with a nullable return value, is there any way to declare the return value is always null (in the signature)?
n
nanodeath
04/10/2021, 4:50 AM
not from a types perspective but you might be able to use method contracts for that
👍 1
m
Mark
04/10/2021, 5:03 AM
I guess the other option would be to convert to using a sealed class return type (non-null)
e
ephemient
04/10/2021, 5:52 AM
Nothing?
can only possibly be
null
👍 3
3
Views
Open in Slack
Previous
Next