Skip to content

Commit 64382fe

Browse files
committed
Revert "CLJ-1162 Improved error message from invalid deref"
This reverts commit 838783e.
1 parent e3520c0 commit 64382fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/clj/clojure/core.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,13 +2333,13 @@
23332333
value is available. See also - realized?."
23342334
{:added "1.0"
23352335
:static true}
2336-
([ref] (if (instance? java.util.concurrent.Future ref)
2337-
(deref-future ref)
2338-
(.deref ^clojure.lang.IDeref ref)))
2336+
([ref] (if (instance? clojure.lang.IDeref ref)
2337+
(.deref ^clojure.lang.IDeref ref)
2338+
(deref-future ref)))
23392339
([ref timeout-ms timeout-val]
2340-
(if (instance? java.util.concurrent.Future ref)
2341-
(deref-future ref timeout-ms timeout-val)
2342-
(.deref ^clojure.lang.IBlockingDeref ref timeout-ms timeout-val))))
2340+
(if (instance? clojure.lang.IBlockingDeref ref)
2341+
(.deref ^clojure.lang.IBlockingDeref ref timeout-ms timeout-val)
2342+
(deref-future ref timeout-ms timeout-val))))
23432343

23442344
(defn atom
23452345
"Creates and returns an Atom with an initial value of x and zero or

0 commit comments

Comments
 (0)