Commit Graph

8 Commits

Author SHA1 Message Date
Slava Pestov
2ef101c815 Sema: Don't add local functions to TC.definedFunctions
Instead, check them and their error handling right away.

In addition to fixing the crash in the radar, this also causes
us to emit unused variable warnings in functions containing
local functions.

Eventually, TC.definedFunctions should go away altogether.

Fixes <rdar://problem/53956342>.
2019-08-07 00:37:21 -04:00
Doug Gregor
a0aaca176c [SE-0258] Clarify diagnostic banning '$' identifiers.
Thanks to Zachary Waldowski for helping clarify this.
2019-05-31 15:17:22 -07:00
Doug Gregor
7f293f66b3 [Parser] Allow use of $ declarations in all modes.
Allow the use of declarations whose names start with $ in all
modes. However, normal code cannot define new entities with names that
start with $: only the implementation can do that, e.g., for property
delegates.
2019-04-23 11:31:58 -07:00
Rintaro Ishizaki
509db744f1 [Lexer] Disallow '$' as a start of identifier, special handle '$' (#6004)
Allowing 'let `$0` = 1', introduced in 6accc598 was not intentional.
2016-12-21 11:31:58 +09: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
Robert Widmann
6accc5989e Disable the ability to use '$' as an identifier harder
When in Swift 3 Compatibility Mode we now acceptable a standalone
'$' as an identifier.  In all other cases this is now disallowed
and must be surrounded by backticks.
2016-10-27 16:51:18 -04:00
Robert Widmann
389f779a27 Fixup tests 2016-07-31 19:28:45 -07:00
Wheerd
f008d03c73 Added a simple test for dollar identifier lexing. 2016-07-31 19:28:45 -07:00