sbglasius commented on code in PR #15759:
URL: https://github.com/apache/grails-core/pull/15759#discussion_r3488242054


##########
grails-core/src/main/groovy/org/grails/compiler/ControllerTagLibTypeCheckingExtension.groovy:
##########
@@ -90,7 +89,12 @@ class ControllerTagLibTypeCheckingExtension extends 
GroovyTypeCheckingExtensionS
 
         beforeVisitClass { ClassNode classNode ->
             newScope {
-                isController = 
classNode.name.endsWith(ControllerArtefactHandler.TYPE)
+                // Both controllers and tag libraries dispatch tags at runtime 
through the
+                // TagLibraryInvoker trait, so both receive the same 
dynamic-dispatch silencing.
+                // 'TagLib' is matched as a literal because grails-core has no 
dependency on the
+                // taglib module; it mirrors 
org.grails.core.artefact.gsp.TagLibArtefactHandler.TYPE.
+                isTagDispatcher = 
classNode.name.endsWith(ControllerArtefactHandler.TYPE) ||
+                        classNode.name.endsWith('TagLib')

Review Comment:
   Instead use `CompileStaticArtefactInjector.TAGLIB_TYPE` as text constant.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to