mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] do not infer closure type parameters from toString() and getParameterCount()
This commit is contained in:
+12
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -67,6 +67,12 @@ public class GrClosureType extends GrLiteralClassType {
|
||||
return "Closure";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getParameterCount() {
|
||||
PsiClass resolved = resolve();
|
||||
return resolved != null && resolved.getTypeParameters().length == 1 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiType[] getParameters() {
|
||||
@@ -188,4 +194,9 @@ public class GrClosureType extends GrLiteralClassType {
|
||||
public GrSignature getSignature() {
|
||||
return mySignature;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PsiType: Closure<*>";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user