Fix error text

This commit is contained in:
Roman Shevchenko
2012-05-24 21:43:36 +04:00
parent 748284c1e2
commit 7a6e19486a
2 changed files with 25 additions and 11 deletions
@@ -1,3 +1,19 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// illegal method calls
class A {
@@ -48,14 +64,12 @@ class CX {
class c {
c() {
c() {}
}
class inner {
class ininner {}
}
static void f() {
<error descr="'c.this' cannot be referenced from a static context">new inner()</error>;
}
@@ -88,21 +102,20 @@ class DCC {
}
public DCC(int i, int z) {
<error descr="Method call expected">DCC(i)</error>;
<error descr="Method call expected">DCC(i)</error>;
}
void f() {
<error descr="Method call expected">DCC(1)</error>;
new DCC(1);
}
{
<error descr="Qualifier must be an expression">java</error>.toString();
}
{
<error descr="Qualifier must be an expression">java</error>.toString();
}
}
class ThisExpression {
static String foo() {
System.out.println(<error descr="'ThisExpression.this' cannot be referenced from a static context">this</error>);
return <error descr="'ThisExpression.this' cannot be referenced from a static context">this</error>.toString();
return <error descr="'ThisExpression.super' cannot be referenced from a static context">super</error>.toString();
}
}