We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e392b38 commit 482c87aCopy full SHA for 482c87a
src/main/java/com/tang/intellij/lua/ty/Ty.kt
@@ -89,10 +89,16 @@ abstract class Ty(override val kind: TyKind) : ITy {
89
90
override fun toString(): String {
91
val list = mutableListOf<String>()
92
- TyUnion.each(this) {
93
- if (!it.isAnonymous)
+ TyUnion.each(this) { //尽量不使用Global
+ if (!it.isAnonymous && !(it is ITyClass && it.hasFlag(TyFlags.GLOBAL)))
94
list.add(it.displayName)
95
}
96
+ if (list.isEmpty()) { //使用Global
97
+ TyUnion.each(this) {
98
+ if (!it.isAnonymous && (it is ITyClass && it.hasFlag(TyFlags.GLOBAL)))
99
+ list.add(it.displayName)
100
+ }
101
102
return list.joinToString("|")
103
104
0 commit comments