ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
799 stars 127 forks source link

Adding array support in Type #407

Closed nshaheed closed 9 months ago

nshaheed commented 9 months ago

This is my first-draft attempt at adding array support in Type. Currently there's some inconsistency in behavior. The following code:

[1] @=> int arr_prim[];

<<< Type.of(arr_prim).name() >>>;
<<< Type.of(arr_prim).isArray() >>>;

<<< Type.find("int[]").name() >>>;
<<< Type.find("int[]").isArray() >>>;

Prints out

"@array" :(string)
0 :(int)
"int[]" :(string)
1 :(int)

So, isArray() is working for find, but not of.