Code completion used to suggest non-static members in member var initializer,
and incorrectly reported the reason why the declarations are visible from the
initializer.
Swift SVN r14457
User can not call them directly, so code completion now skips them just like
getters and setters.
This is part of fixing rdar://15849262
Swift SVN r14341
These changes add support for build and target configurations in the compiler.
Build and target configurations, combined with the use of #if/#else/#endif allow
for conditional compilation within declaration and statement contexts.
Build configurations can be passed into the compiler via the new '-D' flag, or
set within the LangOptions class. Target configurations are implicit, and
currently only "os" and "arch" are supported.
Swift SVN r14305
- purge @inout from comments in the compiler except for places talking about
the SIL argument convention.
- change diagnostics to not refer to @inout
- Change the astprinter to print InoutType without the @, so it doesn't show
up in diagnostics or in closure argument types in code completion.
- Implement type parsing support for the new inout syntax (before we just
handled patterns).
- Switch the last couple of uses in the stdlib (in types) to inout.
- Various testcase updates (more to come).
Swift SVN r13564
- Introduce a new TypeBase::getInOutObjectType() that strips off @inout types
- Switch stuff that is calling getRValueType() to call getInOutObjectType()
when they are stripping @inout, not @lvalue (this is primarily around
stuff working with self)
- Update testcases, some diagnostics improve around & handling.
This fixes rdar://15708430 and rdar://15729093.
Swift SVN r11794
(various) FunctionType::get's, ArrayType::get,
ArraySliceType::get, OptionalType::get, and a few
other places.
There is more to be done here, but this is all I plan to do
for now.
Swift SVN r11497
This completes the FileUnit refactoring. A module consists of multiple
FileUnits, which provide decls from various file-like sources. I say
"file-like" because the Builtin module is implemented with a single
BuiltinUnit, and imported Clang modules are just a single FileUnit source
within a module.
Most modules, therefore, contain a single file unit; only the main module
will contain multiple source files (and eventually partial AST files).
The term "translation unit" has been scrubbed from the project. To refer
to the context of declarations outside of any other declarations, use
"top-level" or "module scope". To refer to a .swift file or its DeclContext,
use "source file". To refer to a single unit of compilation, use "module",
since the model is that an entire module will be compiled with a single
driver call. (It will still be possible to compile a single source file
through the direct-to-frontend interface, but only in the context of the
whole module.)
Swift SVN r10837
nominal, substitute known generic parameters if possible
This should improve code completion experience for generic containers a lot:
(swift) var a = Array<Float>()
// a : Array<Float> = []
(swift) a.
...
Decl[InstanceMethod]/CurrNominal: append({#val: Float#})[#Void#]
...
Decl[InstanceMethod]/CurrNominal: each({#f: (Float) -> Void#})[#Void#]
...
Decl[InstanceMethod]/CurrNominal: enumerate()[#Array<Float>#]
...
Decl[InstanceMethod]/CurrNominal: next()[#Float?#]
...
Decl[InstanceMethod]/CurrNominal: sort({#pred: (Float, Float) -> Bool#})[#Void#]
...
Only implemented for functions. Constructors and subscripts coming soon.
Swift SVN r10774
And, properly treat imports as per-file: when looking up decls through the
TU module, don't pick up every other source file's imports.
This implements our resolution rules:
1. Check the current source file.
2. Check the current module.
3. Check imported modules.
Currently, "import Foo" is treated as a file-private import and
"@reexported import Foo" is treated as a public /and/ module-wide import.
This further suggests that access control is the right tool for re-export
control:
(private) import Foo // current file only
package import Foo // whole module
public import Foo // whole world
Swift SVN r9682