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
public interface IProvider {
Java.Lang.Object Get ();
}
public class ProviderOfLazy : IProvider {
public ILazy Get () { ... }
}
Initially you will get an error that this doesn't count as the implementation because of covariant return types.
If you try to do the usual fix of changing ProviderOfLazy.Get to return JLO, then you get a different error because ILazy in an interface, which does not inherit JLO:
error CS0266: Cannot implicitly convert type 'Com.Google.Firebase.Inappmessaging.Dagger.ILazy' to
'Java.Lang.Object'. An explicit conversion exists (are you missing a cast?)
This could potentially be fixed by casting to JLO, since we "know" the object will be a JLO.
Context: xamarin/GooglePlayServicesComponents#404
Given this construct:
Initially you will get an error that this doesn't count as the implementation because of covariant return types.
If you try to do the usual fix of changing
ProviderOfLazy.Get
to returnJLO
, then you get a different error becauseILazy
in an interface, which does not inheritJLO
:This could potentially be fixed by casting to
JLO
, since we "know" the object will be aJLO
.The text was updated successfully, but these errors were encountered: