> Anybody know why this D program:
>
> inline string s = "abc";
> BEGIN
> {
> printf (s);
> exit(0);
> }
>
> generates this error?
>
> dtrace: failed to compile script inl.d: line 5: printf( ) argument #1 is
> incompatible with prototype:
> prototype: string constant
> argument: string
>
> I thought inlines, resolvable to a constant value at compile time,
> became actual constants.
>
> Thanks,
> Chip
Chip,
Indeed they could be treated as such by the printf code, but as you''ve
observed the compiler isn''t yet doing so. I''ll open a bug on
this for you.
Sorry if it caused any confusion,
-Mike
--
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/