Assume I have a generic type like class Foo <T>
with a method like func bar (_ arg: T)
.
If I do let foo = Foo<Void>()
, I cannot do foo.bar()
without getting:
Cannot invoke 'bar' with no arguments
Didn't this used to work in older versions of Swift? Or am I doing something wrong?
foo.bar(())
works, but is obviously less than ideal.