Created
May 8, 2016 00:13
-
-
Save jkthorne/1b5778e41422522caf1f0b2776d8e572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in ./main.cr:51: instantiating 'Polish::CLI:Class#run()' | |
Polish::CLI.run | |
^~~ | |
in ./main.cr:14: instantiating 'Polish::CLI#run()' | |
new.run | |
^~~ | |
in ./main.cr:34: instantiating 'parse!()' | |
parse! | |
^~~~~~ | |
in ./main.cr:18: instantiating 'OptionParser:Class#parse!()' | |
OptionParser.parse! do |parser| | |
^~~~~~ | |
in /usr/local/Cellar/crystal-lang/0.16.0/src/option_parser.cr:56: instantiating 'parse(Array(String))' | |
parse(ARGV) { |parser| yield parser } | |
^~~~~ | |
in /usr/local/Cellar/crystal-lang/0.16.0/src/option_parser.cr:56: instantiating 'parse(Array(String))' | |
parse(ARGV) { |parser| yield parser } | |
^~~~~ | |
in ./main.cr:18: instantiating 'OptionParser:Class#parse!()' | |
OptionParser.parse! do |parser| | |
^~~~~~ | |
in ./main.cr:24: instantiating 'Polish::CLI#debug=(Bool)' | |
self.debug = true | |
^~~~~ | |
in macro 'setter' /usr/local/Cellar/crystal-lang/0.16.0/src/object.cr:414, line 3: | |
1. | |
2. | |
3. def debug=(@debug) | |
4. end | |
5. | |
6. | |
7. | |
8. def file_name=(@file_name) | |
9. end | |
10. | |
11. | |
12. | |
def debug=(@debug) | |
^~~~~~ | |
Can't infer the type of instance variable '@debug' of Polish::CLI (did you mean @debud?) | |
The type of a instance variable, if not declared explicitly with | |
`@debug : Type`, is inferred from assignments to it across | |
the whole program. | |
The assignments must look like this: | |
1. `@debug = 1` (or other literals), inferred to the literal's type | |
2. `@debug = Type.new`, type is inferred to be Type | |
3. `@debug = Type.method`, where `method` has a return type | |
annotation, type is inferred from it | |
4. `@debug = arg`, with 'arg' being a method argument with a | |
type restriction 'Type', type is inferred to be Type | |
5. `@debug = arg`, with 'arg' being a method argument with a | |
default value, type is inferred using rules 1, 2 and 3 from it | |
6. `@debug = uninitialized Type`, type is inferred to be Type | |
7. `@debug = LibSome.func`, and `LibSome` is a `lib`, type | |
is inferred from that fun. | |
8. `LibSome.func(out @debug)`, and `LibSome` is a `lib`, type | |
is inferred from that fun argument. | |
Other assignments have no effect on its type. | |
Can't infer the type of instance variable '@debug' of Polish::CLI (did you mean @debud?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment