Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2024 IBM Corporation and others.
* Copyright (c) 2000, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -268,7 +268,7 @@ public boolean visit(ClassInstanceCreation node) {
if (fTypeCounter == 0) {
Expression receiver= node.getExpression();
if (receiver == null) {
if (node.resolveTypeBinding().isLocal() && !node.resolveTypeBinding().isAnonymous())
if (node.resolveTypeBinding().isMember())
fImplicitReceivers.add(node);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package bugs_in;

public class Test_issue_3070_1 {
public static void main(String[] args) {
Test_issue_3070_1 obj = new Test_issue_3070_1();
int result = obj.f();
System.out.println(result);
}

class H {
int g() {
return 7;
}
}

int /*]*/f()/*[*/ {
return new H().g();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package bugs_in;

public class Test_issue_3070_2 {
public static void main(String[] args) {
Test_issue_3070_2 obj = new Test_issue_3070_2();
int result = obj.f();
System.out.println(result);
}

int /*]*/f()/*[*/ {
class H {
int g() {
return 7;
}
}
return new H().g();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package bugs_in;

public class Test_issue_3070_1 {
public static void main(String[] args) {
Test_issue_3070_1 obj = new Test_issue_3070_1();
int result = obj.new H().g();
System.out.println(result);
}

class H {
int g() {
return 7;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package bugs_in;

public class Test_issue_3070_2 {
public static void main(String[] args) {
Test_issue_3070_2 obj = new Test_issue_3070_2();
class H {
int g() {
return 7;
}
}
int result = new H().g();
System.out.println(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,16 @@ public void test_issue_2376() throws Exception {
performBugTest();
}

@Test
public void test_issue_3070_1() throws Exception {
performBugTest();
}

@Test
public void test_issue_3070_2() throws Exception {
performBugTest();
}

/* *********************** Argument Tests ******************************* */

private void performArgumentTest() throws Exception {
Expand Down
Loading