On the website there is this example: ```every { ...
# mockk
k
On the website there is this example:
Copy code
every { 
    constructedWith<MockCls>(OfTypeMatcher<String>(String::class)).add(2) // Mocks the constructor which takes a String
} returns 3
Why does
OfTypeMatcher
need to have the type
String
mentioned twice? If it was defined differently, we would be able to have just
OfTypeMatcher<String>()
(if we used reified generics), or just
OfTypeMatcher(String::class)
. Perhaps I've misunderstood its usage and the two
String
type references don't have to be the same?