Commit Graph

3 Commits

Author SHA1 Message Date
Arnold Schwaighofer
3e2c4ac24c Require optimized stdlib for stdlib/move_function test
rdar://86543481
2021-12-17 08:09:06 -08:00
Michael Gottesman
5aa34f43f8 [move-function] Add tests around var uniqueness properties of move. 2021-12-13 10:39:07 -08:00
Michael Gottesman
396f510d06 [move-function] Add support for properly checking let x: Int without an initial value.
We process these as loadable vars. This is really useful since it ensures that
uniqueness is preserved in this case:

```
  let x: K2
  do {
      x = self.k2
  }
  switch _move(x)[userHandle] {
  case .foo:
      assert(_isUnique(&self.k2))
  }
```

I added a test that proves this.
2021-12-11 00:18:09 -08:00