Another instance of getEnclosingFunction -> getRoot

This commit is contained in:
Owen Mansel-Chan
2021-12-05 06:47:10 -05:00
parent 3cf1459c4f
commit 63b944a1b4

View File

@@ -294,7 +294,7 @@ module Revel {
exists(Type controllerType, string controllerRe, string handlerRe, string pathRe |
controllerType = skipImplicitFieldReads(this.getReceiver().asInstruction()).getResultType() and
controllerRe = "\\Q" + controllerType.getName() + "\\E" and
handlerRe = "\\Q" + this.asExpr().getEnclosingFunction().getName() + "\\E" and
handlerRe = "\\Q" + this.getRoot().(FuncDef).getName() + "\\E" and
// find a file named '/views/<controller>/<handler>(.<template type>).html
pathRe = "/views/" + controllerRe + "/" + handlerRe + "(\\..*)?\\.html?"
|