Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003152 [Quercus] minor always 12-11-08 21:29 12-13-08 00:05
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.0 Product Version 4.0.0
  Product Build
Summary 0003152: Postincrement in method call fails to compile
Description This doesn't seem to happen in a trivial test case, but this method in one of our classes:

  protected function cb_IDENTIFIER($token) {
    $i = 0;
    while ($prev = $this->prev($i++)) {
      if (!isset($this->JUNK[$prev->type])) {
        break;
      }
    }
    if ($prev && ($prev->type == 'PERIOD')) {
      $token->type = 'PROPERTY';
    } else if (isset($this->KEYWORDS[$token->value])) {
      $token->type = 'KEYWORD';
    }
    return $token;
  }

fails to compile with the latest Resin Pro code.

[21:19:07.184] {resin-19} com.caucho.java.JavaCompileException: ...__php.java:1828: unexpected type
[21:19:07.184] {resin-19} required: variable
[21:19:07.184] {resin-19} found : value
[21:19:07.184] {resin-19} while (_v[si_prev_2].set(q_this.callMethod(env, 48366030, _qc_prev, 4, LongValue.create((_v[si_i_3].toLong()++))).copyReturn()).toBoolean()) {
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003609)
koreth
12-12-08 10:10

Here's a trimmed-down test case for this. I think I quoted the wrong method up above; sorry about that.

This test case of course doesn't make sense in terms of functionality but it's the minimum set of lines I could come up with to demonstrate the compilation failure. Oddly, if you take away the "if" clause, the "while" starts compiling okay.

<?php
function blah() {
  $i = 0;
  while ($i++);
  if ($prev1) {
    $prev1->property_value = preg_replace('#x#', 'y', $foo);
  }
}
 
(0003616)
nam
12-13-08 00:05

php/3ab8
 

- Issue History
Date Modified Username Field Change
12-11-08 21:29 koreth New Issue
12-12-08 10:10 koreth Note Added: 0003609
12-13-08 00:05 nam Status new => assigned
12-13-08 00:05 nam Assigned To  => nam
12-13-08 00:05 nam Status assigned => closed
12-13-08 00:05 nam Note Added: 0003616
12-13-08 00:05 nam Resolution open => fixed
12-13-08 00:05 nam Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker