Ticket #1079 (closed bug: invalid)

Opened 12 years ago

Last modified 12 years ago

Chaining operator ':=' is ignored in NQP

Reported by: Austin_Hastings Owned by: pmichaud
Priority: normal Milestone:
Component: PCT Version: 1.6.0
Severity: medium Keywords: NQP, chain, operator:<:=>, binding
Cc: Language:
Patch status: Platform:

Description

Chaining a series of binding, like:

my $a;
my $b;

$a := $b := 0;

produces code that assigns the first var to the second, but ignores the second-third binding entirely:

.namespace []
.sub "_block11"  :anon :subid("10_1254300777")
.annotate "line", 1
    new $P13, "Undef"
    .lex "$a", $P13
.annotate "line", 2
    new $P14, "Undef"
    .lex "$b", $P14
.annotate "line", 4
    new $P15, "Integer"
    assign $P15, 0
    find_lex $P16, "$b"
    unless_null $P16, vivify_11
    new $P16, "Undef"
  vivify_11:
    store_lex "$a", $P16
.annotate "line", 1
    .return ($P16)
.end

Change History

Changed 12 years ago by jimmy

  • status changed from new to closed
  • resolution set to invalid

compilers/nqp is no longer around. Please use NQP-rx, and I didn't see the same bug in NQP-rx.

Note: See TracTickets for help on using tickets.