{"action":"opened","issue":{"url":"https://api.github.com/repos/typetools/checker-framework-inference/issues/2","labels_url":"https://api.github.com/repos/typetools/checker-framework-inference/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/typetools/checker-framework-inference/issues/2/comments","events_url":"https://api.github.com/repos/typetools/checker-framework-inference/issues/2/events","html_url":"https://github.com/typetools/checker-framework-inference/issues/2","id":97814499,"number":2,"title":"IllegalArgumentException when visiting annotation on an array during inference","user":{"login":"jthaine","id":7230054,"avatar_url":"https://avatars.githubusercontent.com/u/7230054?v=3","gravatar_id":"","url":"https://api.github.com/users/jthaine","html_url":"https://github.com/jthaine","followers_url":"https://api.github.com/users/jthaine/followers","following_url":"https://api.github.com/users/jthaine/following{/other_user}","gists_url":"https://api.github.com/users/jthaine/gists{/gist_id}","starred_url":"https://api.github.com/users/jthaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthaine/subscriptions","organizations_url":"https://api.github.com/users/jthaine/orgs","repos_url":"https://api.github.com/users/jthaine/repos","events_url":"https://api.github.com/users/jthaine/events{/privacy}","received_events_url":"https://api.github.com/users/jthaine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"JonathanBurke","id":11344450,"avatar_url":"https://avatars.githubusercontent.com/u/11344450?v=3","gravatar_id":"","url":"https://api.github.com/users/JonathanBurke","html_url":"https://github.com/JonathanBurke","followers_url":"https://api.github.com/users/JonathanBurke/followers","following_url":"https://api.github.com/users/JonathanBurke/following{/other_user}","gists_url":"https://api.github.com/users/JonathanBurke/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanBurke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanBurke/subscriptions","organizations_url":"https://api.github.com/users/JonathanBurke/orgs","repos_url":"https://api.github.com/users/JonathanBurke/repos","events_url":"https://api.github.com/users/JonathanBurke/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanBurke/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-07-28T22:23:08Z","updated_at":"2015-07-28T22:23:08Z","closed_at":null,"body":"What steps will reproduce the problem?\r\n./scripts/inference.py --checker ostrusted.OsTrustedChecker --mode roundtrip-typecheck --log-level FINE --solver checkers.inference.solver.MaxSat2TypeSolver bar.java\r\n\r\n\r\nContents of bar.java:\r\n\r\nimport ostrusted.quals.OsTrusted;\r\nclass bar {\r\n    void foo(@OsTrusted String @OsTrusted [] s){}\r\n}\r\n\r\n\r\nWhat is the expected output? What do you see instead?\r\nExpect inference and typechecking to complete without errors. See an IllegalArgumentException instead (stack trace below).\r\n\r\n\r\n\r\nWhat version of the product are you using? \r\n\r\n* master 167eb7f Add missing dependencies on sat4j.\r\n\r\n\r\n\r\nStack trace:\r\n\r\nerror: SourceChecker.typeProcess: unexpected Throwable (IllegalArgumentException) while processing bar.java; message: Unexpected tree (@OsTrusted()\r\n  String @OsTrusted() [] s) for type (@OsTrusted String @OsTrusted [])\r\n  Compilation unit: bar.java\r\n  Exception: java.lang.IllegalArgumentException: Unexpected tree (@OsTrusted()\r\n  String @OsTrusted() [] s) for type (@OsTrusted String @OsTrusted []); Stack trace: checkers.inference.VariableAnnotator.visitArray(VariableAnnotator.java:859)\r\n  checkers.inference.VariableAnnotator.visitArray(VariableAnnotator.java:91)\r\n  org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedArrayType.accept(AnnotatedTypeMirror.java:1348)\r\n  org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.scan(AnnotatedTypeScanner.java:99)\r\n  org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.visit(AnnotatedTypeScanner.java:89)\r\n  checkers.inference.VariableAnnotator.visitTogether(VariableAnnotator.java:1422)\r\n  checkers.inference.VariableAnnotator.handleMethodDeclaration(VariableAnnotator.java:1357)\r\n  checkers.inference.VariableAnnotator.visitExecutable(VariableAnnotator.java:1189)\r\n  checkers.inference.VariableAnnotator.visitExecutable(VariableAnnotator.java:91)\r\n  org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedExecutableType.accept(AnnotatedTypeMirror.java:1083)\r\n  org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.scan(AnnotatedTypeScanner.java:99)\r\n  org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.visit(AnnotatedTypeScanner.java:89)\r\n  checkers.inference.InferenceTreeAnnotator.visitMethod(InferenceTreeAnnotator.java:195)\r\n  checkers.inference.InferenceTreeAnnotator.visitMethod(InferenceTreeAnnotator.java:55)\r\n  com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:800)\r\n  com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:53)\r\n  org.checkerframework.framework.type.treeannotator.ListTreeAnnotator.defaultAction(ListTreeAnnotator.java:38)\r\n  org.checkerframework.framework.type.treeannotator.ListTreeAnnotator.defaultAction(ListTreeAnnotator.java:21)\r\n  com.sun.source.util.SimpleTreeVisitor.visitMethod(SimpleTreeVisitor.java:77)\r\n  org.checkerframework.framework.type.treeannotator.TreeAnnotator.visitMethod(TreeAnnotator.java:35)\r\n  org.checkerframework.framework.type.treeannotator.TreeAnnotator.visitMethod(TreeAnnotator.java:17)\r\n  com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:800)\r\n  com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:53)\r\n  checkers.inference.InferenceAnnotatedTypeFactory.annotateImplicit(InferenceAnnotatedTypeFactory.java:466)\r\n  org.checkerframework.framework.type.GenericAnnotatedTypeFactory.annotateImplicit(GenericAnnotatedTypeFactory.java:882)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:722)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1826)\r\n  org.checkerframework.framework.type.TypesIntoElements.storeMethod(TypesIntoElements.java:91)\r\n  org.checkerframework.framework.type.TypesIntoElements.store(TypesIntoElements.java:80)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.postProcessClassTree(AnnotatedTypeFactory.java:750)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:735)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1805)\r\n  org.checkerframework.framework.type.GenericAnnotatedTypeFactory.performFlowAnalysis(GenericAnnotatedTypeFactory.java:604)\r\n  checkers.inference.InferenceAnnotatedTypeFactory.performFlowAnalysis(InferenceAnnotatedTypeFactory.java:442)\r\n  org.checkerframework.framework.type.GenericAnnotatedTypeFactory.checkAndPerformFlowAnalysis(GenericAnnotatedTypeFactory.java:931)\r\n  checkers.inference.InferenceAnnotatedTypeFactory.annotateImplicit(InferenceAnnotatedTypeFactory.java:477)\r\n  org.checkerframework.framework.type.GenericAnnotatedTypeFactory.annotateImplicit(GenericAnnotatedTypeFactory.java:882)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:722)\r\n  org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1805)\r\n  org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:296)\r\n  org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:173)\r\n  com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:720)\r\n  com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:50)\r\n  org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:70)\r\n  org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:890)\r\n  org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:452)\r\n  org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:205)\r\n  com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:681)\r\n  com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:111)\r\n  com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1342)\r\n  com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1296)\r\n  com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)\r\n  com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)\r\n  com.sun.tools.javac.main.Main.compile(Main.java:523)\r\n  com.sun.tools.javac.main.Main.compile(Main.java:381)\r\n  com.sun.tools.javac.main.Main.compile(Main.java:370)\r\n  com.sun.tools.javac.main.Main.compile(Main.java:361)\r\n  checkers.inference.CheckerFrameworkUtil.invokeCheckerFramework(CheckerFrameworkUtil.java:12)\r\n  checkers.inference.InferenceMain.startCheckerFramework(InferenceMain.java:159)\r\n  checkers.inference.InferenceMain.run(InferenceMain.java:112)\r\n  checkers.inference.InferenceCli.main(InferenceCli.java:92)\r\n"}}