diff options
author | Patrick Beard <pcbeard@mac.com> | 2012-03-20 21:09:25 +0000 |
---|---|---|
committer | Patrick Beard <pcbeard@mac.com> | 2012-03-20 21:09:25 +0000 |
commit | ca7f5bdf8bf1e485abc802cac97f2c4c4172d638 (patch) | |
tree | a6d222fcecfd66aea583cd19f37571c7206b16e8 /docs | |
parent | 7f919c8c840f7cbf9d1d3193fceb1969c0e11c89 (diff) |
Fixed typos.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ObjectiveCLiterals.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ObjectiveCLiterals.html b/docs/ObjectiveCLiterals.html index 277e613691..2e533faf8a 100644 --- a/docs/ObjectiveCLiterals.html +++ b/docs/ObjectiveCLiterals.html @@ -120,11 +120,11 @@ NSDictionary *dictionary = @{ }; </pre> -This creates an <code>NSDictionary</code> with 3 key/value pairs. Value sub-expressions of a dictionary literal must be Objective-C object pointer typed, as in array literals. Key sub-expresions must be of an Objective-C object pointer type that implements the <code><NSCopying></code> protocol.<p> +This creates an <code>NSDictionary</code> with 3 key/value pairs. Value sub-expressions of a dictionary literal must be Objective-C object pointer typed, as in array literals. Key sub-expressions must be of an Objective-C object pointer type that implements the <code><NSCopying></code> protocol.<p> <h3>Discussion</h3> -Nil keys or nil values are not supported in containers. If the compiler can prove that a key or value is nil at compile time, then a warning will be emitted. Otherwise, a runtime error will occur.<p> +Neither keys nor values can have the value <code>nil</code> in containers. If the compiler can prove that a key or value is <code>nil</code> at compile time, then a warning will be emitted. Otherwise, a runtime error will occur.<p> Using array and dictionary literals is safer than the variadic creation forms commonly in use today. Array literal expressions expand to calls to <code>+[NSArray arrayWithObjects:count:]</code>, which validates that all objects are non-<code>nil</code>. The variadic form, <code>+[NSArray arrayWithObjects:]</code> uses <code>nil</code> as an argument list terminator, which can lead to malformed array objects. Dictionary literals are similarly created with <code>+[NSDictionary dictionaryWithObjects:forKeys:count:]</code> which validates all objects and keys, unlike <code>+[NSDictionary dictionaryWithObjectsAndKeys:]</code> which also uses a <code>nil</code> parameter as an argument list terminator.<p> |