[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

?:variable patterns in templates



I have no access to DRM right now, so I have to ask here...

Consider this macro:

define macro foo
 { foo(?:variable) } => { identity(?variable) }
end macro;

Used in

foo(bar :: <integer>)

Should this compile?

IIRC, it should expand to
identity(bar)
in this context.

However d2c seems to expand it to
identity(bar :: <integer>)

which seems to be a bug to me.

OTOH there are expansion contexts, where the latter is desired. How should this be done? (implemented?)


Thanks cordially,


	Gabor