   }
   let _: Int = fn4 // expected-error{{value of type '() async -> ()'}}
 }
+
+func takesAsyncClosure(_ closure: () async -> String) -> Int { 0 }
+func takesAsyncClosure(_ closure: () -> String) -> String { "" }
+
+func testPassAsyncClosure() {
+  let a = takesAsyncClosure { await overloadedSame() }
+  let _: Double = a // expected-error{{convert value of type 'Int'}}
+
+  let b = takesAsyncClosure { overloadedSame() } // expected-warning{{synchronous is no fun}}
+  let _: Double = b // expected-error{{convert value of type 'String'}}
+}

}

// Overloading
func overloaded() -> String { "synchronous" }
func overloaded() async -> Double { 3.14159 }

func testOverloadedSync() {
  let _ = overloaded()
  let fn = {
    overloaded()

}

func testOverloadedAsync() async {
  _ = await overloadedSame() // no warning

  let _ = await overloaded()
  let _ = overloaded() // expected-error{{call is 'async' but is not marked with 'await'}}

