mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Generalize @_opaqueReturnTypeOf syntax to correctly handle parameter packs
We now allow the dummy identifier to be a qualified reference, so
that we can reconstruct generic parameter lists from multiple levels:
@_opaqueReturnTypeOf(...) __.<OuterArgs...>.__<InnerArgs...>
This fixes an ambiguity with parameter packs, where flattening the
packs from multiple levels of nested types no longer produced an
unambiguous result.
To maintain backward compatibility, we still accept the old "flat"
form when no parameter packs are present.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
//
|
||||
// RUN: not %target-swift-frontend -typecheck %s -I %t 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: cannot find type 'InvalidParameter' in scope
|
||||
// CHECK: unable to resolve type for _opaqueReturnTypeOf attribute
|
||||
// CHECK: failed to build module 'InvalidOpaqueResultType' for importation
|
||||
import InvalidOpaqueResultType
|
||||
|
||||
Reference in New Issue
Block a user