File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public class Compiler implements Opcodes{
66
66
static final Symbol LIST = Symbol .create ("clojure.core" , "list" );
67
67
static final Symbol HASHMAP = Symbol .create ("clojure.core" , "hash-map" );
68
68
static final Symbol VECTOR = Symbol .create ("clojure.core" , "vector" );
69
+ static final Symbol IDENTITY = Symbol .create ("clojure.core" , "identity" );
69
70
70
71
static final Symbol _AMP_ = Symbol .create ("&" );
71
72
static final Symbol ISEQ = Symbol .create ("clojure.lang.ISeq" );
@@ -4041,7 +4042,12 @@ public static Object macroexpand1(Object x) throws Exception{
4041
4042
throw new IllegalArgumentException (
4042
4043
"Malformed member expression, expecting (.member target ...)" );
4043
4044
Symbol meth = Symbol .intern (sname .substring (1 ));
4044
- return RT .listStar (DOT , RT .second (form ), meth , form .rest ().rest ());
4045
+ Object target = RT .second (form );
4046
+ if (HostExpr .maybeClass (target ,false ) != null )
4047
+ {
4048
+ target = RT .list (IDENTITY , target );
4049
+ }
4050
+ return RT .listStar (DOT , target , meth , form .rest ().rest ());
4045
4051
}
4046
4052
else if (namesStaticMember (sym ))
4047
4053
{
You can’t perform that action at this time.
0 commit comments