Skip to content

Commit 3425828

Browse files
committed
type hint collection constants to common base
1 parent 041e6bb commit 3425828

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/jvm/clojure/lang/Compiler.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,14 @@ public boolean hasJavaClass(){
18721872
}
18731873

18741874
public Class getJavaClass() {
1875-
return v.getClass();
1875+
if(v instanceof APersistentMap)
1876+
return APersistentMap.class;
1877+
else if (v instanceof APersistentSet)
1878+
return APersistentSet.class;
1879+
else if (v instanceof APersistentVector)
1880+
return APersistentVector.class;
1881+
else
1882+
return v.getClass();
18761883
//throw new IllegalArgumentException("Has no Java class");
18771884
}
18781885

0 commit comments

Comments
 (0)