Ticket #466 (closed bug: wontfix)
PAST::Val.new( :value( ~$/ ), :returns('Complex')) generates incorrect pir
Reported by: | bsdz | Owned by: | pmichaud |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | PCT | Version: | trunk |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: | all |
Description
When trying to assigned capture string to a Complex type the generated PIR does not quote the string token so one ends up with something like: -
new $P14, "Complex" assign $P14, 10i
When you really want: -
assign $P14, "10j"
This can be fixed by adding the a valflag option in src/PAST/Compiler.pir similar to String's settings.
valflagsComplex? = 's~*:e'
However, this might break some future intended usage.
It would be something useful to control from NQP.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.