This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180198 - Formal parameter is not refactored from loop body
Summary: Formal parameter is not refactored from loop body
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: J Bachorik
URL: http://javafx-jira.kenai.com/browse/J...
Keywords:
: 180337 (view as bug list)
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2010-02-03 04:14 UTC by Alexandr Scherbatiy
Modified: 2010-04-12 10:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2010-02-03 04:14:24 UTC
NetBeans-JavaFX-Soma: #140

  Product Version         = NetBeans IDE Dev (Build 201001280200)
(#eeef33500a1a)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun
Microsystems Inc.


Steps to reproduce:

- Copy the code to the editor:
------------------------------------------
var seq: String[];

function show() {
    for (aaa in seq) "{aaa}"
}
------------------------------------------

- Refactor->Rename the 'aaa' variable to 'aaa2' in the "{aaa}" loop body

The result is
------------------------------------------
function show() {
    for (aaa in seq) "{aaa2}"
}
------------------------------------------

Main.fx:11: cannot find symbol
symbol  : variable aaa2
location: class javafxapplication10.Main
    for (aaa in seq) "{aaa2}"
1 error
Comment 1 J Bachorik 2010-02-05 02:35:30 UTC
This is caused by javafxc error - see http://javafx-jira.kenai.com/browse/JFXC-4087
Comment 2 J Bachorik 2010-02-05 07:17:05 UTC
*** Bug 180337 has been marked as a duplicate of this bug. ***
Comment 3 Alexandr Scherbatiy 2010-02-08 05:14:50 UTC
One more case:

- Copy the code to the editor:
--------------------------------------------------
class A {

    public var seq: Number[];

    function run() {
        for (s1 in seq) {

            for (s2 in seq[s | s != s1]) {
                println(s1);
                println(s2);
            }

        }
    }

}
--------------------------------------------------

- Select the 's1' parameter in 'for (s1 in seq) {' line
  and Refactor->Rename it to 's3'

- Build the code:
Main.fx:15: cannot find symbol
symbol  : variable s1
location: class javafxapplication19.Main.A
            for (s2 in seq[s | s != s1]) {
Main.fx:16: cannot find symbol
symbol  : variable s1
location: class javafxapplication19.Main.A
                println(s1);
2 errors
Comment 4 J Bachorik 2010-03-26 08:29:45 UTC
So, the JFXC-4087 has been fixed. Unfortunately, it introduced another problem preventing successful resolution of this issue (JFXC-4258 : link in URL)
Comment 5 J Bachorik 2010-04-06 16:31:26 UTC
Fixed in the latest trunk build
Comment 6 Alexandr Scherbatiy 2010-04-12 10:05:28 UTC
verified in NetBeans-JavaFX-Soma:  #217