Lines 1638-1641
Link Here
|
1638 |
"a cannot be resolved to a variable\n" + |
1638 |
"a cannot be resolved to a variable\n" + |
1639 |
"----------\n"); |
1639 |
"----------\n"); |
1640 |
} |
1640 |
} |
|
|
1641 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=310264 |
1642 |
public void test0044() { |
1643 |
this.runNegativeTest( |
1644 |
new String[] { |
1645 |
"X.java", |
1646 |
"class X {\n" + |
1647 |
" volatile int x;\n" + |
1648 |
" int nvx;\n" + |
1649 |
" void foo(int i) {\n" + |
1650 |
" x = x;\n" + |
1651 |
" nvx = nvx;\n" + |
1652 |
" }\n" + |
1653 |
"}" |
1654 |
}, |
1655 |
"----------\n" + |
1656 |
"1. WARNING in X.java (at line 6)\n" + |
1657 |
" nvx = nvx;\n" + |
1658 |
" ^^^^^^^^^\n" + |
1659 |
"The assignment to variable nvx has no effect\n" + |
1660 |
"----------\n"); |
1661 |
} |
1662 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=310264 |
1663 |
public void test0045() { |
1664 |
this.runNegativeTest( |
1665 |
new String[] { |
1666 |
"X.java", |
1667 |
"class X {\n" + |
1668 |
" volatile int x = this.x;\n" + |
1669 |
" int nvx = this.nvx;\n" + |
1670 |
" void foo(int i) {\n" + |
1671 |
" }\n" + |
1672 |
"}" |
1673 |
}, |
1674 |
"----------\n" + |
1675 |
"1. WARNING in X.java (at line 2)\n" + |
1676 |
" volatile int x = this.x;\n" + |
1677 |
" ^^^^^^^^^^\n" + |
1678 |
"The assignment to variable x has no effect\n" + |
1679 |
"----------\n" + |
1680 |
"2. WARNING in X.java (at line 3)\n" + |
1681 |
" int nvx = this.nvx;\n" + |
1682 |
" ^^^^^^^^^^^^^^\n" + |
1683 |
"The assignment to variable nvx has no effect\n" + |
1684 |
"----------\n"); |
1685 |
} |
1641 |
} |
1686 |
} |