I have a java library method requiring a class of Void as a parameter. for example, in com.mongodb.async.client.MongoCollection:
void insertOne(TDocument document, SingleResultCallback<Void> callback);
I'm accessing this method from scala. Scala uses the type Unit as equivalent of Void (correct me if I'm wrong please)
How can I pass a SingleResultCallback[Unit] (instead of SingleResultCallback[Void]) to this method? The compiler is not allowing this. Shouldn't it be picking this up?