Skip to content

Commit

Permalink
Avoid removeLast(), it requires JRE 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Dobell committed Nov 12, 2023
1 parent 7a45612 commit ff6e079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class IllegalAliasInspection : LocalInspectionTool() {
}

while (pendingTys.isNotEmpty()) {
val pendingTy = pendingTys.removeLast()
val pendingTy = pendingTys.removeAt(pendingTys.size - 1)

if (visitedTys.add(pendingTy)) {
if (pendingTy == alias || (pendingTy as? ITyGeneric)?.base == alias) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tang/intellij/lua/ty/Ty.kt
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ abstract class Ty(override val kind: TyKind) : ITy {
}

while (pendingTys.isNotEmpty()) {
val pendingTy = pendingTys.removeLast()
val pendingTy = pendingTys.removeAt(pendingTys.size - 1)

if (visitedTys.add(pendingTy.ty)) {
val resolvedMemberTy = (pendingTy.ty as? ITyResolvable)?.resolve(context) ?: pendingTy.ty
Expand Down Expand Up @@ -857,7 +857,7 @@ abstract class Ty(override val kind: TyKind) : ITy {
}

while (pendingTys.isNotEmpty()) {
val pendingTy = pendingTys.removeLast()
val pendingTy = pendingTys.removeAt(pendingTys.size - 1)

if (visitedTys.add(pendingTy)) {
val resolvedMemberTy = (pendingTy as? ITyResolvable)?.resolve(context) ?: pendingTy
Expand Down

0 comments on commit ff6e079

Please sign in to comment.