{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/litho/issues/373","repository_url":"https://api.github.com/repos/facebook/litho","labels_url":"https://api.github.com/repos/facebook/litho/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/facebook/litho/issues/373/comments","events_url":"https://api.github.com/repos/facebook/litho/issues/373/events","html_url":"https://github.com/facebook/litho/issues/373","id":326548132,"number":373,"title":"varArg properties breaks when using most types.","user":{"login":"kjbilliot","id":19919967,"avatar_url":"https://avatars2.githubusercontent.com/u/19919967?v=4","gravatar_id":"","url":"https://api.github.com/users/kjbilliot","html_url":"https://github.com/kjbilliot","followers_url":"https://api.github.com/users/kjbilliot/followers","following_url":"https://api.github.com/users/kjbilliot/following{/other_user}","gists_url":"https://api.github.com/users/kjbilliot/gists{/gist_id}","starred_url":"https://api.github.com/users/kjbilliot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjbilliot/subscriptions","organizations_url":"https://api.github.com/users/kjbilliot/orgs","repos_url":"https://api.github.com/users/kjbilliot/repos","events_url":"https://api.github.com/users/kjbilliot/events{/privacy}","received_events_url":"https://api.github.com/users/kjbilliot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T14:32:18Z","updated_at":"2018-05-25T14:32:18Z","closed_at":null,"author_association":"NONE","body":"- [x] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate\r\n\r\n## Version\r\n\r\n`Config.Dependencies.litho` is `\"0.14.0\"`\r\n\r\n```\r\n    implementation(\"com.facebook.litho\", \"litho-core\", Config.Dependencies.litho)\r\n    implementation(\"com.facebook.litho\", \"litho-widget\", Config.Dependencies.litho)\r\n    compileOnly(\"com.facebook.litho\", \"litho-annotations\", Config.Dependencies.litho)\r\n    kapt(\"com.facebook.litho\", \"litho-annotations\", Config.Dependencies.litho)\r\n    kapt(\"com.facebook.litho\", \"litho-processor\", Config.Dependencies.litho)\r\n```\r\n\r\n## Issues and Steps to Reproduce\r\n\r\n1. Create either LayoutSpec or MountSpec.\r\n2. Add `@Prop(varArg = \"name\") names : List<String>` as a property. \r\n3. Code should compile fine here.\r\n4. Change types to something else outside of basic types (IE: Color, TextView, etc)\r\n5. Code will no longer compile, giving the following two errors in the build panel, from the generated component .java file.\r\n`error: illegal start of type    public Builder color(@NotNull) ? extends Color color) {`\r\n`error: ';' expected    public Builder color(@NotNull) ? extends Color color) {`\r\n\r\n## Expected Behavior\r\nCode should compile fine, and I should be able to use the component in the way demonstrated in [the documentation](https://fblitho.com/docs/props#variable-arguments) for whatever type I'd need to be a varArg.\r\n\r\n## Link to Code\r\nExample code in Kotlin.\r\n\r\n```\r\n@LayoutSpec\r\nobject TestComponentSpec {\r\n    @OnCreateLayout\r\n    fun onCreateLayout(\r\n        c : ComponentContext,\r\n        @Prop(varArg = \"color\") colors : List<Color>\r\n    ) : Component {\r\n        return Row.create(c).build()\r\n    }\r\n}\r\n```\r\nErrors from Gradle:\r\n\r\n```\r\ne: /home/<snip>/android/app/build/generated/source/kapt/devDebug/com/mingo/chat/ui/TestComponent.java:130: error: illegal start of type\r\n    public Builder color(@NotNull ? extends Color color) {\r\n                                  ^\r\ne: /home/<snip>/android/app/build/generated/source/kapt/devDebug/com/mingo/chat/ui/TestComponent.java:130: error: ')' expected\r\n    public Builder color(@NotNull ? extends Color color) {\r\n                                   ^\r\ne: /home/<snip>/android/app/build/generated/source/kapt/devDebug/com/mingo/chat/ui/TestComponent.java:130: error: ';' expected\r\n    public Builder color(@NotNull ? extends Color color) {\r\n                                           ^\r\ne: /home/<snip>/android/app/build/generated/source/kapt/devDebug/com/mingo/chat/ui/TestComponent.java:130: error: <identifier> expected\r\n    public Builder color(@NotNull ? extends Color color) {\r\n                                                       ^\r\n```\r\n"}}
{"actor":{"display_login":"kjbilliot"}}