@@ -144,7 +144,7 @@ public static Expr Parse(ParserContext pcon, ISeq form)
144144 bool tailPosition = Compiler . InTailCall ( pcon . Rhc ) ;
145145 pcon = pcon . EvalOrExpr ( ) ;
146146
147- Expr fexpr = Compiler . Analyze ( pcon , form . first ( ) ) ;
147+ Expr fexpr = Compiler . Analyze ( pcon , form . first ( ) ) ;
148148 VarExpr varFexpr = fexpr as VarExpr ;
149149
150150 if ( varFexpr != null && varFexpr . Var . Equals ( Compiler . InstanceVar ) && RT . count ( form ) == 3 )
@@ -158,12 +158,12 @@ public static Expr Parse(ParserContext pcon, ISeq form)
158158 }
159159 }
160160
161- if ( RT . booleanCast ( Compiler . GetCompilerOption ( Compiler . DirectLinkingKeyword ) )
161+ if ( RT . booleanCast ( Compiler . GetCompilerOption ( Compiler . DirectLinkingKeyword ) )
162162 && varFexpr != null
163- && pcon . Rhc != RHC . Eval )
163+ && pcon . Rhc != RHC . Eval )
164164 {
165165 Var v = varFexpr . Var ;
166- if ( ! v . isDynamic ( ) && ! RT . booleanCast ( RT . get ( v . meta ( ) , Compiler . RedefKeyword , false ) ) && ! RT . booleanCast ( RT . get ( v . meta ( ) , RT . DeclaredKey , false ) ) )
166+ if ( ! v . isDynamic ( ) && ! RT . booleanCast ( RT . get ( v . meta ( ) , Compiler . RedefKeyword , false ) ) && ! RT . booleanCast ( RT . get ( v . meta ( ) , RT . DeclaredKey , false ) ) )
167167 {
168168 Symbol formTag = Compiler . TagOf ( form ) ;
169169 //object arglists = RT.get(RT.meta(v), Compiler.ArglistsKeyword);
@@ -210,7 +210,7 @@ public static Expr Parse(ParserContext pcon, ISeq form)
210210 // the field itself rather than trying to invoke the value in the field. This is
211211 // an exception to the uniform Class/member qualification per CLJ-2806 ticket.
212212
213- if ( fexpr is StaticFieldExpr )
213+ if ( fexpr is StaticFieldExpr || fexpr is StaticPropertyExpr )
214214 return fexpr ;
215215
216216
@@ -239,6 +239,21 @@ public static Expr Parse(ParserContext pcon, ISeq form)
239239
240240 static Expr ToHostExpr ( ParserContext pcon , QualifiedMethodExpr qmfexpr , Symbol tag , bool tailPosition , ISeq args )
241241 {
242+ // Let's see if we have generic type parameters. We'll ignore this if we are a constructor -- constructors can't be generic.
243+
244+
245+ object firstArg = RT . first ( args ) ;
246+ List < Type > genericTypeArgs = null ;
247+ ISeq processedArgs = args ;
248+
249+ if ( firstArg is ISeq && RT . first ( firstArg ) is Symbol symbol && symbol . Equals ( HostExpr . TypeArgsSym ) )
250+ {
251+ // We have a type args supplied for a generic method call
252+ // (. thing methodname (type-args type1 ... ) args ...)
253+ genericTypeArgs = HostExpr . ParseGenericMethodTypeArgs ( RT . next ( firstArg ) ) ;
254+ processedArgs = RT . next ( args ) ;
255+ }
256+
242257 if ( qmfexpr . HintedSig != null )
243258 {
244259 MethodBase method = QualifiedMethodExpr . ResolveHintedMethod ( qmfexpr . MethodType , qmfexpr . MethodName , qmfexpr . Kind , qmfexpr . HintedSig ) ;
@@ -256,12 +271,12 @@ static Expr ToHostExpr(ParserContext pcon, QualifiedMethodExpr qmfexpr, Symbol t
256271 ( string ) Compiler . SourceVar . deref ( ) ,
257272 ( IPersistentMap ) Compiler . SourceSpanVar . deref ( ) ,
258273 tag ,
259- ( Expr ) RT . first ( args ) ,
274+ ( Expr ) RT . first ( processedArgs ) ,
260275 qmfexpr . MethodType ,
261276 Compiler . munge ( qmfexpr . MethodName ) ,
262277 ( MethodInfo ) method ,
263- null , // TODO: is there a way to pass type args here?
264- HostExpr . ParseArgs ( pcon , RT . next ( args ) ) ,
278+ genericTypeArgs ,
279+ HostExpr . ParseArgs ( pcon , RT . next ( processedArgs ) ) ,
265280 tailPosition ) ;
266281
267282 default :
@@ -271,9 +286,9 @@ static Expr ToHostExpr(ParserContext pcon, QualifiedMethodExpr qmfexpr, Symbol t
271286 tag ,
272287 qmfexpr . MethodType ,
273288 Compiler . munge ( qmfexpr . MethodName ) ,
274- ( MethodInfo ) method ,
275- null ,
276- HostExpr . ParseArgs ( pcon , args ) ,
289+ ( MethodInfo ) method ,
290+ genericTypeArgs ,
291+ HostExpr . ParseArgs ( pcon , processedArgs ) ,
277292 tailPosition ) ;
278293 }
279294 }
@@ -292,11 +307,11 @@ static Expr ToHostExpr(ParserContext pcon, QualifiedMethodExpr qmfexpr, Symbol t
292307 ( string ) Compiler . SourceVar . deref ( ) ,
293308 ( IPersistentMap ) Compiler . SourceSpanVar . deref ( ) ,
294309 tag ,
295- ( Expr ) RT . first ( args ) ,
310+ ( Expr ) RT . first ( processedArgs ) ,
296311 qmfexpr . MethodType ,
297312 Compiler . munge ( qmfexpr . MethodName ) ,
298- null ,
299- HostExpr . ParseArgs ( pcon , RT . seq ( RT . next ( args ) ) ) ,
313+ genericTypeArgs ,
314+ HostExpr . ParseArgs ( pcon , RT . seq ( RT . next ( processedArgs ) ) ) ,
300315 tailPosition ) ;
301316
302317 default :
@@ -306,8 +321,8 @@ static Expr ToHostExpr(ParserContext pcon, QualifiedMethodExpr qmfexpr, Symbol t
306321 tag ,
307322 qmfexpr . MethodType ,
308323 Compiler . munge ( qmfexpr . MethodName ) ,
309- null ,
310- HostExpr . ParseArgs ( pcon , args ) ,
324+ genericTypeArgs ,
325+ HostExpr . ParseArgs ( pcon , processedArgs ) ,
311326 tailPosition ) ;
312327 }
313328 }
0 commit comments