We're updating the issue view to help you get more done. 

instance? fails on deftype instance, when used from multiple files

Description

When instance? is called from two separate namespaces to test an instance of a user defined type, one of them fails

In the attached project, the following (identical) tests run correctly:

lein test instance-test.test.core
lein test instance-test.test.core2

but this fails:

lein test

For ease of reference, the attached project contains the following:

(ns instance-test.core)
(deftype MyType [a])
(defn make-my-type
[]
(MyType. nil))

(ns instance-test.test.core
(:use [instance-test.core] :reload-all)
(:use [clojure.test])
(:import instance-test.core.MyType))

(deftest test1
(is (instance? instance-test.core.MyType (make-my-type))))

(ns instance-test.test.core2
(:use [instance-test.core] :reload-all)
(:use [clojure.test])
(:import instance-test.core.MyType))

(deftest test1
(is (instance? instance-test.core.MyType (make-my-type))))

Environment

None

Status

Assignee

Unassigned

Reporter

import

Labels

None

Approval

None

Patch

None

Fix versions

Priority