{"action":"closed","issue":{"url":"https://api.github.com/repos/TheKidCoder/SocketBroker/issues/1","repository_url":"https://api.github.com/repos/TheKidCoder/SocketBroker","labels_url":"https://api.github.com/repos/TheKidCoder/SocketBroker/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/TheKidCoder/SocketBroker/issues/1/comments","events_url":"https://api.github.com/repos/TheKidCoder/SocketBroker/issues/1/events","html_url":"https://github.com/TheKidCoder/SocketBroker/issues/1","id":162463947,"number":1,"title":"Can not run","user":{"login":"temkin","id":1636083,"avatar_url":"https://avatars.githubusercontent.com/u/1636083?v=3","gravatar_id":"","url":"https://api.github.com/users/temkin","html_url":"https://github.com/temkin","followers_url":"https://api.github.com/users/temkin/followers","following_url":"https://api.github.com/users/temkin/following{/other_user}","gists_url":"https://api.github.com/users/temkin/gists{/gist_id}","starred_url":"https://api.github.com/users/temkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temkin/subscriptions","organizations_url":"https://api.github.com/users/temkin/orgs","repos_url":"https://api.github.com/users/temkin/repos","events_url":"https://api.github.com/users/temkin/events{/privacy}","received_events_url":"https://api.github.com/users/temkin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-27T14:22:02Z","updated_at":"2016-06-27T14:41:48Z","closed_at":"2016-06-27T14:41:48Z","body":"Hi! I am new to Crystal. Trying to run your example and getting an error. I think this is relevant to my Crystal version. Could you please help me? \r\n\r\nHere is my log: \r\n\r\n```console\r\n☁  SocketBroker [master] shards install\r\nUpdating https://github.com/stefanwille/crystal-redis.git\r\nUsing redis (1.5.1)\r\n☁  SocketBroker [master] crystal -v\r\nCrystal 0.18.4 (2016-06-21)\r\n☁  SocketBroker [master] crystal src/SocketBroker.cr\r\nError in ./src/SocketBroker.cr:23: instantiating 'SocketBroker::Server:Class#new(SocketBroker::Config)'\r\n\r\nserver = SocketBroker::Server.new(config)\r\n                              ^~~\r\n\r\ninstantiating 'SocketBroker::Server#initialize(SocketBroker::Config)'\r\n\r\nin ./src/SocketBroker/server.cr:7: Can't infer the type of instance variable '@config' of SocketBroker::Server\r\n\r\nThe type of a instance variable, if not declared explicitly with\r\n`@config : Type`, is inferred from assignments to it across\r\nthe whole program.\r\n\r\nThe assignments must look like this:\r\n\r\n  1. `@config = 1` (or other literals), inferred to the literal's type\r\n  2. `@config = Type.new`, type is inferred to be Type\r\n  3. `@config = Type.method`, where `method` has a return type\r\n     annotation, type is inferred from it\r\n  4. `@config = arg`, with 'arg' being a method argument with a\r\n     type restriction 'Type', type is inferred to be Type\r\n  5. `@config = arg`, with 'arg' being a method argument with a\r\n     default value, type is inferred using rules 1, 2 and 3 from it\r\n  6. `@config = uninitialized Type`, type is inferred to be Type\r\n  7. `@config = LibSome.func`, and `LibSome` is a `lib`, type\r\n     is inferred from that fun.\r\n  8. `LibSome.func(out @config)`, and `LibSome` is a `lib`, type\r\n     is inferred from that fun argument.\r\n\r\nOther assignments have no effect on its type.\r\n\r\nCan't infer the type of instance variable '@config' of SocketBroker::Server\r\n\r\n      @config = config\r\n      ^~~~~~~\r\n```"}}
{"actor":{"display_login":"TheKidCoder"}}