Wrong "Incorrect arity" on top-level function calls inside deftest: claims the arity is 1 larger than it actually is
In the following code, the top-level function calls inside foo2 have false warnings about incorrect arity, but the identical calls inside foo1 are fine. Invalidating caches doesn't help.
(ns example
(:require [clojure.test :refer :all]))
(defn foo1 []
(is (= 3 (+ 1 2))
"math")
(cons nil 1)
(count []))
(deftest foo2
(is (= 3 (+ 1 2)) ; Incorrect arity 3 for clojure.test/is
"math")
(cons nil 1) ; Incorrect arity 3 for clojure.core/cons
(count [])) ; Incorrect arity 2 for clojure.core/count

IntelliJ IDEA 2021.2 (Ultimate Edition) Build #IU-212.4746.92, built on July 27, 2021 Runtime version: 11.0.11+9-b1504.13 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.5.1 GC: G1 Young Generation, G1 Old Generation Memory: 3072M Cores: 8 Registry: ide.tooltip.initialDelay=0, ide.images.show.chessboard=true Non-Bundled Plugins: com.jetbrains.ChooseRuntime (1.2), org.intellij.plugins.hcl (0.7.10), AWSCloudFormation (212.4746.57), org.nik.presentation-assistant (1.0.9), String Manipulation (8.15.203.000.3), intellij.prettierJS (212.4746.57), Pythonid (212.4746.96), org.jetbrains.plugins.ruby (212.4746.92), org.jetbrains.plugins.go (212.4746.92), com.cursiveclojure.cursive (1.10.3-2021.2) Kotlin: 212-1.5.10-release-IJ4746.92
I just tried to reproduce this with latest Cursive, and I can't - is this still happening for you?
It's still happening with Cursive 1.12.4. It was still happening directly in my primary work project, after which I tried reproducing it in a minimal blank project: at first the bug didn't appear, but after Invalidate Caches and restarting IDEA the bug appeared also in that minimal project:
