Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expr() not handling correctly #11

Open
sk- opened this issue Sep 11, 2013 · 1 comment
Open

expr() not handling correctly #11

sk- opened this issue Sep 11, 2013 · 1 comment

Comments

@sk-
Copy link

sk- commented Sep 11, 2013

When running phantm against PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) an exception is raised.

java -jar ../../../phantm-1.0.7.jar Finder/DefaultFinder.php FinderInterface.php


Exception in thread "main" java.lang.RuntimeException: expr() not handling correctly: Closure(List(ArgumentDecl(SimpleVariable(Identifier(file)),Some(THObject(StaticClassRef(NSIdentifier(NSResolved,List(SplFileInfo))))),None,false)),List(ArgumentDecl(SimpleVariable(Identifier(files)),None,None,false)),false,Block(List(Return(BooleanNot(FunctionCall(StaticFunctionRef(NSIdentifier(NSResolved,List(in_array))),List(CallArg(MethodCall(SimpleVariable(Identifier(file)),StaticMethodRef(Identifier(getRelativePathname)),List()),false), CallArg(SimpleVariable(Identifier(files)),false))))))))(/home/skreft/Downloads/PHP-CS-Fixer/Symfony/CS/Finder/DefaultFinder.php line 37 column 21)
    at scala.sys.package$.error(package.scala:27)
    at phantm.cfg.ASTToCFG$.expr$1(ASTToCFG.scala:470)
    at phantm.cfg.ASTToCFG$$anonfun$exprStoreGet$1$2.apply(ASTToCFG.scala:336)
    at phantm.cfg.ASTToCFG$$anonfun$exprStoreGet$1$2.apply(ASTToCFG.scala:336)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
    at scala.collection.immutable.List.map(List.scala:76)
    at phantm.cfg.ASTToCFG$.exprStoreGet$1(ASTToCFG.scala:336)
    at phantm.cfg.ASTToCFG$.expr$1(ASTToCFG.scala:365)
    at phantm.cfg.ASTToCFG$.stmt$1(ASTToCFG.scala:778)
    at phantm.cfg.ASTToCFG$.stmts$1(ASTToCFG.scala:487)
    at phantm.cfg.ASTToCFG$.stmt$1(ASTToCFG.scala:521)
    at phantm.cfg.ASTToCFG$.stmts$1(ASTToCFG.scala:487)
    at phantm.cfg.ASTToCFG$.convertAST(ASTToCFG.scala:817)
    at phantm.phases.CFGGenerator$$anonfun$visit$1.apply(CFGGenerationPhase.scala:65)
    at phantm.phases.CFGGenerator$$anonfun$visit$1.apply(CFGGenerationPhase.scala:61)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at phantm.phases.CFGGenerator.visit(CFGGenerationPhase.scala:61)
    at phantm.ast.ASTSimpleTraversal$$anonfun$execute$1.apply(ASTTraversal.scala:16)
    at phantm.ast.ASTSimpleTraversal$$anonfun$execute$1.apply(ASTTraversal.scala:16)
    at phantm.ast.ASTSimpleTraversal.visit0$1(ASTTraversal.scala:12)
    at phantm.ast.ASTSimpleTraversal$$anonfun$traverse$1.apply(ASTTraversal.scala:13)
    at phantm.ast.ASTSimpleTraversal$$anonfun$traverse$1.apply(ASTTraversal.scala:13)
    at phantm.ast.ASTTraversal.traverse0$1(ASTTraversal.scala:49)
    at phantm.ast.ASTTraversal.traverse(ASTTraversal.scala:68)
    at phantm.ast.ASTSimpleTraversal.traverse(ASTTraversal.scala:13)
    at phantm.ast.ASTSimpleTraversal.execute(ASTTraversal.scala:16)
    at phantm.phases.CFGGenerationPhase$.run(CFGGenerationPhase.scala:20)
    at phantm.phases.PhasesRunner$$anonfun$run$1$$anonfun$apply$mcV$sp$2.apply(PhasesRunner.scala:38)
    at phantm.phases.PhasesRunner$$anonfun$run$1$$anonfun$apply$mcV$sp$2.apply(PhasesRunner.scala:33)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at phantm.phases.PhasesRunner$$anonfun$run$1.apply$mcV$sp(PhasesRunner.scala:33)
    at scala.util.control.Breaks.breakable(Breaks.scala:39)
    at phantm.phases.PhasesRunner.run(PhasesRunner.scala:32)
    at phantm.Main$.main(Main.scala:38)
    at phantm.Main.main(Main.scala)

@colder
Copy link
Owner

colder commented Sep 11, 2013

Sadly, closures are not supported currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants