4 Jan
2017
4 Jan
'17
9:59 a.m.
Given the following declarations: SinOsc s0; SqrOsc s1; TriOsc s2; The following gives an error: [s0, s1, s2] @=> UGen A[]; $ ... cannot resolve operator '=>' on types 'Osc[]' and 'UGen[]'... But the following works fine: [s0, s1, s2] @=> Osc A[]; It is not a problem, but would like to understand this behaviour. It would seem that assigning to UGen[] would be ok because it looks like a superclass of Osc[]. Aaah! Is this to do with co/contra-variance?