Commit Graph

4 Commits

Author SHA1 Message Date
Anthony Latsis
4099e85da6 [Diagnostics & Tests] SR-6052 Prevent nil capitalization (#16256)
And provide better semantic background by surrounding 'nil' in ticks when it is referred to as a value

Added missing tests for certain cases involving nil capitalization
2018-05-03 09:10:30 -07:00
Robert Widmann
788f65bdf0 Bail on nil literal diagnostics if the source is Optional 2018-04-03 01:51:59 -04:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Jordan Rose
405bfdc33b [Sema] Add a fix-it for non-optional bindings initialized with nil.
<stdin>:1:16: error: nil cannot initialize specified type 'Int'
var foo: Int = nil
               ^
<stdin>:1:10: note: add '?' to form the optional type 'Int?'
var foo: Int = nil
         ^
            ?
2016-04-21 13:36:54 -07:00