Files
swift-mirror/test/Concurrency/hop_to_executor_unreachable_code.swift
Erik Eckstein ce7358d35d SIL: create hop_to_executor instructions with "auto-generated" debug locations.
Those instructions should not be "visible" for debugging and for diagnostic messages.

Fixes a wrong "unreachable code" warning.

https://bugs.swift.org/browse/SR-14873
rdar://80237870
2021-08-26 19:14:16 +02:00

18 lines
329 B
Swift

// RUN: %target-swift-frontend -disable-availability-checking -emit-sil -verify %s
// REQUIRES: concurrency
// Check that the inserted hop-to-executor instructions don't cause a false
// "unreachable code" warning.
@MainActor
func bye() -> Never {
print("bye")
fatalError()
}
func testit() async {
await bye()
}