Switch some diagnostic text from 'static' over to 'type' to make
things easier, and fix up some parsing issues with selector-style
declarations found by doing this. NFC
Swift SVN r12030
arguments. Until we have @inout methods on structs, we can't mark anything
that can be address-exposed. This temporarily regresses a few testcases,
but they will come back later.
Swift SVN r11359
var decls. I was originally intending to use this for argument lists, but I
don't think that's a great direction to go anymore.
In any case, it seems uncontroversial to enforce immutability on foreach
enumation patterns, so I did that (see testcase)
Swift SVN r11124
The contexts for which we set the DisallowStoredVar bit, currently enums and extensions, can both (theoretically) support static variables, so change PD_DisallowStoredVar to PD_DisallowStoredInstanceVar, and allow static vars to be declared in these contexts.
Swift SVN r10350
Previously, the Parser and BranchStmt typedef-ed ExprStmtOrDecl as a pointer union. Using typedef made the objects compatible, but did not allow us to extend the type with helper methods, such as getSourceRange(), which is something you can get on all of the AST objects. This patch introduces ASTNode that subclasses from PointerUnion and is used by both parser and BranchStmt.
Swift SVN r9971
I tried hard find all references to 'func' in documentation, comments and
diagnostics, but I am sure that I missed a few. If you find something, please
let me know.
rdar://15346654
Swift SVN r9886
This ensures that the brace range will include all contained items.
The previous scheme of choosing the end location of the last item was not accurate because for pattern bindings decls
we also push the var decls as items, but they don't have the full source range of the pattern binding decl.
Fixes rdar://15190792.
Swift SVN r9293
These are the terms sent out in the proposal last week and described in
StoredAndComputedVariables.rst.
variable
anything declared with 'var'
member variable
a variable inside a nominal type (may be an instance variable or not)
property
another term for "member variable"
computed variable
a variable with a custom getter or setter
stored variable
a variable with backing storage; any non-computed variable
These terms pre-exist in SIL and IRGen, so I only attempted to solidify
their definitions. Other than the use of "field" for "tuple element",
none of these should be exposed to users.
field
a tuple element, or
the underlying storage for a stored variable in a struct or class
physical
describes an entity whose value can be accessed directly
logical
describes an entity whose value must be accessed through some accessor
Swift SVN r8698
- suppress error from type checker (missing return value in a non-void
function) if the source had an expression, but had a parse error;
- mark the diagnostic as PointsToFirstBadToken.
Swift SVN r8004