IDEA-166073 Extended Width (long, double) constructors cause issues with anonymous classes
This commit is contained in:
103
testData/src/pkg/TestAnonymousClassConstructor.java
Normal file
103
testData/src/pkg/TestAnonymousClassConstructor.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package pkg;
|
||||
|
||||
class TestAnonymousClassConstructor {
|
||||
void innerPrivateString() {
|
||||
new InnerPrivateString("text"){};
|
||||
}
|
||||
|
||||
void innerPrivate() {
|
||||
new InnerPrivate(3, 4){};
|
||||
}
|
||||
|
||||
void innerStaticPrivateString() {
|
||||
new InnerStaticPrivateString("text"){};
|
||||
}
|
||||
|
||||
void innerStaticPrivate() {
|
||||
new InnerStaticPrivate(3, 4){};
|
||||
}
|
||||
|
||||
static void innerStaticPrivateStringStatic() {
|
||||
new InnerStaticPrivateString("text"){};
|
||||
}
|
||||
|
||||
static void innerStaticPrivateStatic() {
|
||||
new InnerStaticPrivate(3, 4){};
|
||||
}
|
||||
|
||||
void innerPublicString() {
|
||||
new InnerPublicString("text"){};
|
||||
}
|
||||
|
||||
void innerPublic() {
|
||||
new InnerPublic(3, 4){};
|
||||
}
|
||||
|
||||
void innerStaticPublicString() {
|
||||
new InnerStaticPublicString("text"){};
|
||||
}
|
||||
|
||||
void innerStaticPublic() {
|
||||
new InnerStaticPublic(3, 4){};
|
||||
}
|
||||
|
||||
static void innerStaticPublicStringStatic() {
|
||||
new InnerStaticPublicString("text"){};
|
||||
}
|
||||
|
||||
static void innerStaticPublicStatic() {
|
||||
new InnerStaticPublic(3, 4){};
|
||||
}
|
||||
|
||||
static void n(String s) {
|
||||
System.out.println("n(): " + s);
|
||||
}
|
||||
|
||||
class InnerPrivateString {
|
||||
private InnerPrivateString(String s) {
|
||||
n(s);
|
||||
}
|
||||
}
|
||||
|
||||
class InnerPrivate {
|
||||
private InnerPrivate(long a, int b) {
|
||||
n(a + "+" + b);
|
||||
}
|
||||
}
|
||||
|
||||
static class InnerStaticPrivateString {
|
||||
private InnerStaticPrivateString(String s) {
|
||||
n(s);
|
||||
}
|
||||
}
|
||||
|
||||
static class InnerStaticPrivate {
|
||||
private InnerStaticPrivate(long a, int b) {
|
||||
n(a + "+" + b);
|
||||
}
|
||||
}
|
||||
|
||||
class InnerPublicString {
|
||||
public InnerPublicString(String s) {
|
||||
n(s);
|
||||
}
|
||||
}
|
||||
|
||||
class InnerPublic {
|
||||
public InnerPublic(long a, int b) {
|
||||
n(a + "+" + b);
|
||||
}
|
||||
}
|
||||
|
||||
static class InnerStaticPublicString {
|
||||
public InnerStaticPublicString(String s) {
|
||||
n(s);
|
||||
}
|
||||
}
|
||||
|
||||
static class InnerStaticPublic {
|
||||
public InnerStaticPublic(long a, int b) {
|
||||
n(a + "+" + b);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
testData/src/pkg/TestAnonymousParamNames.java
Normal file
27
testData/src/pkg/TestAnonymousParamNames.java
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class TestAnonymousParamNames {
|
||||
private final Clazz reference = new Clazz(0, false) {};
|
||||
|
||||
private class Clazz {
|
||||
public Clazz(long paramL, boolean paramB) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user