Fix type in function name and a better name for another function
This commit is contained in:
+1
-1
@@ -177,7 +177,7 @@ class AlternativeSignatureParsing {
|
|||||||
private static JetTypeConstraint findTypeParameterConstraint(@NotNull JetFunction function, @NotNull Name typeParameterName, int index) {
|
private static JetTypeConstraint findTypeParameterConstraint(@NotNull JetFunction function, @NotNull Name typeParameterName, int index) {
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
int currentIndex = 0;
|
int currentIndex = 0;
|
||||||
for (JetTypeConstraint constraint : function.getTypeConstaints()) {
|
for (JetTypeConstraint constraint : function.getTypeConstraints()) {
|
||||||
if (typeParameterName.equals(constraint.getSubjectTypeParameterName().getReferencedNameAsName())) {
|
if (typeParameterName.equals(constraint.getSubjectTypeParameterName().getReferencedNameAsName())) {
|
||||||
currentIndex++;
|
currentIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class JetTypeParameterListOwner extends JetNamedDeclaration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<JetTypeConstraint> getTypeConstaints() {
|
public List<JetTypeConstraint> getTypeConstraints() {
|
||||||
JetTypeConstraintList typeConstraintList = getTypeConstraintList();
|
JetTypeConstraintList typeConstraintList = getTypeConstraintList();
|
||||||
if (typeConstraintList == null) {
|
if (typeConstraintList == null) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ public class DescriptorResolver {
|
|||||||
deferredUpperBoundCheckerTasks.add(new UpperBoundCheckerTask(extendsBound, type, false));
|
deferredUpperBoundCheckerTasks.add(new UpperBoundCheckerTask(extendsBound, type, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (JetTypeConstraint constraint : declaration.getTypeConstaints()) {
|
for (JetTypeConstraint constraint : declaration.getTypeConstraints()) {
|
||||||
JetSimpleNameExpression subjectTypeParameterName = constraint.getSubjectTypeParameterName();
|
JetSimpleNameExpression subjectTypeParameterName = constraint.getSubjectTypeParameterName();
|
||||||
if (subjectTypeParameterName == null) {
|
if (subjectTypeParameterName == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ public class TypeHierarchyResolver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (JetTypeConstraint constraint : jetClass.getTypeConstaints()) {
|
for (JetTypeConstraint constraint : jetClass.getTypeConstraints()) {
|
||||||
JetTypeReference extendsBound = constraint.getBoundTypeReference();
|
JetTypeReference extendsBound = constraint.getBoundTypeReference();
|
||||||
if (extendsBound != null) {
|
if (extendsBound != null) {
|
||||||
JetType type = trace.getBindingContext().get(TYPE, extendsBound);
|
JetType type = trace.getBindingContext().get(TYPE, extendsBound);
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ public class LazyTypeParameterDescriptor implements TypeParameterDescriptor {
|
|||||||
JetClassOrObject classOrObject = PsiTreeUtil.getParentOfType(jetTypeParameter, JetClassOrObject.class);
|
JetClassOrObject classOrObject = PsiTreeUtil.getParentOfType(jetTypeParameter, JetClassOrObject.class);
|
||||||
if (classOrObject instanceof JetClass) {
|
if (classOrObject instanceof JetClass) {
|
||||||
JetClass jetClass = (JetClass) classOrObject;
|
JetClass jetClass = (JetClass) classOrObject;
|
||||||
for (JetTypeConstraint jetTypeConstraint : jetClass.getTypeConstaints()) {
|
for (JetTypeConstraint jetTypeConstraint : jetClass.getTypeConstraints()) {
|
||||||
if (jetTypeConstraint.isClassObjectContraint() != forClassObject) continue;
|
if (jetTypeConstraint.isClassObjectContraint() != forClassObject) continue;
|
||||||
|
|
||||||
JetSimpleNameExpression constrainedParameterName = jetTypeConstraint.getSubjectTypeParameterName();
|
JetSimpleNameExpression constrainedParameterName = jetTypeConstraint.getSubjectTypeParameterName();
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public class JetLineMarkerProvider implements LineMarkerProvider {
|
|||||||
new Function<PsiElement, String>() {
|
new Function<PsiElement, String>() {
|
||||||
@Override
|
@Override
|
||||||
public String fun(PsiElement element) {
|
public String fun(PsiElement element) {
|
||||||
return countTooltipString(element);
|
return calculateTooltipString(element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new GutterIconNavigationHandler<PsiElement>() {
|
new GutterIconNavigationHandler<PsiElement>() {
|
||||||
@@ -184,7 +184,7 @@ public class JetLineMarkerProvider implements LineMarkerProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String countTooltipString(PsiElement element) {
|
private static String calculateTooltipString(PsiElement element) {
|
||||||
JetFile file = (JetFile)element.getContainingFile();
|
JetFile file = (JetFile)element.getContainingFile();
|
||||||
if (file == null) return "";
|
if (file == null) return "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user