[chuck-users] is 'string' a primitive type?

Kiran O.V. kiranov1986 at gmail.com
Tue Oct 22 07:49:02 EDT 2013


When I click 'add shred' with the following code:

public class A
    static string a;

it throws following message:

[*unnamed1]:line(3): cannot declare static non-primitive objects (yet)...
[*unnamed1]:line(3): ...(hint: declare as ref (@) & initialize outside for

as if string is non-primitive.

And when I follow the suggestion and use a ref

public class A
    static string @ a;

it throws the following message:

[*unnamed1]:line(3): cannot declare references (@) of primitive type
[*unnamed1]:line(3): ...(primitive types: 'int', 'float', 'time', 'dur')

as if string is a primitive type.

Is it a code limitation or am I doing something wrong?

Thanks in advance!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20131022/5e59b2a3/attachment.htm>

More information about the chuck-users mailing list