qualify this with containing class (IDEA-49251)

This commit is contained in:
anna
2011-10-25 19:47:20 +02:00
parent ed24c9b396
commit 1ba41a4b26
10 changed files with 249 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
// "Qualify this expression with 'Test'" "true"
class Test {
void foo(Test t){}
class Foo {
Foo() {
foo(Test.this);
}
}
}

View File

@@ -0,0 +1,18 @@
// "Qualify this expression with 'Test.Foo'" "true"
class Test {
void foo(Foo m) {
}
class Foo {
void bar() {
new Runnable() {
@Override
public void run() {
foo(Foo.this);
}
}.run();
}
}
}

View File

@@ -0,0 +1,10 @@
// "Qualify this expression with 'Test'" "true"
class Test {
void foo(Test t){}
class Foo {
Foo() {
foo(thi<caret>s);
}
}
}

View File

@@ -0,0 +1,10 @@
// "Qualify this expression with 'Test'" "false"
class Test {
void foo(Test t){}
static class Foo {
Foo() {
foo(thi<caret>s);
}
}
}

View File

@@ -0,0 +1,10 @@
// "Qualify this expression with 'Test'" "false"
class Test {
void foo(String t){}
static class Foo {
Foo() {
foo(thi<caret>s);
}
}
}

View File

@@ -0,0 +1,24 @@
// "Qualify this expression with 'Test.Foo'" "false"
class Test {
public void main() {
new Foo() {
void bar() {
new Runnable() {
@Override
public void run() {
foo(th<caret>is);
}
}.run();
}
}.toString();
}
void foo(Foo m) {
}
class Foo {
}
}

View File

@@ -0,0 +1,18 @@
// "Qualify this expression with 'Test.Foo'" "true"
class Test {
void foo(Foo m) {
}
class Foo {
void bar() {
new Runnable() {
@Override
public void run() {
foo(th<caret>is);
}
}.run();
}
}
}