src/test/06-Errors/error-runtime-cast.ck
raw| 1 | // error case: runtime invalid cast |
| 2 | // as of 1.5.2.0 chuck performs runtime cast verification |
| 3 | // for all Object casts |
| 4 | |
| 5 | // ok |
| 6 | Gain foo; |
| 7 | // ok |
| 8 | foo @=> UGen @ ugen; |
| 9 | // acceptable at compile time; NOT OK at runtime |
| 10 | // expect exception for incompatible dyanmic cast |
| 11 | ugen $ SinOsc @=> SinOsc @ uh; |
| 12 | // shouldn't get here because that would be bad... |
| 13 | 440 => uh.freq; |