You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
Describe the bug
Method GetInstance<T?>() may return nullable type but it never be happen because exception will be thrown if unable to resolve it.
To Reproduce
Expected behavior
Method GetInstance<T> should accept T as generic parameter and return T type without nullable.
MethodGetInstanceOrDefault<T?>may accept T? as generic parameter and return T? with nullable type (return null if it's not resolved).
The text was updated successfully, but these errors were encountered:
It is currently actually possible to get a null reference here if you register the service with a custom expression that returns a null.
I think Singularity could handle this case better though by being more null aware. Most of the code was written before nullable references were a thing.
Describe the bug
Method
GetInstance<T?>()
may return nullable type but it never be happen because exception will be thrown if unable to resolve it.To Reproduce
Expected behavior
Method
GetInstance<T>
should acceptT
as generic parameter and returnT
type without nullable.Method
GetInstanceOrDefault<T?>
may acceptT?
as generic parameter and returnT?
with nullable type (returnnull
if it's not resolved).The text was updated successfully, but these errors were encountered: