Commit Graph

5 Commits

Author SHA1 Message Date
Allan Shortlidge
b97e27279e Sema: Fix opaque type accessors with inactive availability conditions.
Opaque type metadata accessor functions could be miscompiled for functions that
contain `if #available` checks for inactive platforms. For example, this
function will always return `A` when compiled for macOS, but the opaque type
accessor would instead return the type metadata for `B`:

```
func f() -> some P {
  if #available(iOS 99, *) {
    return A() // Returns an A on macOS
  } else {
    return B()
  }
}
```

Resolves rdar://139487970.
2024-11-10 09:23:39 -08:00
Hamish Knight
5d0ad81932 [test] Remove unnecessary --color flags
This is now the default.
2024-02-09 16:47:03 +00:00
Pavel Yaskevich
afb78b402d [Tests] NFC: Disable remote/device execution of opaque result type cross module test
Resolves: rdar://99100097
2022-08-24 14:27:16 -07:00
Pavel Yaskevich
498721c9df [TypeChecker] SE-360: Add support for if #unavailable
Lift a temporary restriction and make `if #available`
and `if #unavailable` behave consistently.
2022-07-20 13:26:43 -07:00
Pavel Yaskevich
cd17bee644 [Serialization] Opaque types: serialize conditionally available underlying types
Resolves: rdar://90595158
2022-04-04 12:45:20 -07:00