Commit Graph

5 Commits

Author SHA1 Message Date
Doug Gregor
f34aa79df1 [Property delegates] Implicit initialization for properties with delegates.
When a property delegate type has a default initializer, use that to
implicitly initialize properties that use that delegate and do not have
their own initializers. For example, this would allow (e.g.), delegate
types like the DelayedImmutable and DelayedMutable examples to drop
the explicit initialization, e.g.,

```
  @DelayedMutable var foo: Int
```

would be implicitly initialized via

```
  $foo = DelayedMutable()
```

This is a simplistic implementation that does not yet propertly handle
definite initialization.

Fixes rdar://problem/50266039.
2019-05-01 23:17:16 -07:00
Doug Gregor
7df695536e [Property delegates] Fix printing of memberwise initializer default arguments 2019-04-23 11:32:28 -07:00
Doug Gregor
261b879b54 [Property delegates] Rename storageValue to delegateValue 2019-04-23 11:32:28 -07:00
Doug Gregor
4f56db2653 [Property delegates] Implement support for storageValue 2019-04-23 11:32:28 -07:00
Doug Gregor
9e22400117 Add missing header file 2019-04-23 11:31:59 -07:00