mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Opaque types are gathered and visited separately. As with local types, only serialize them if they are not within a skipped function body. Fixes a crash caused when compiling the primary file, where delayed parsing is explictly disabled. Resolves rdar://73167790
22 lines
738 B
Swift
22 lines
738 B
Swift
// RUN: %target-build-swift -Xfrontend -disable-availability-checking -emit-module -module-name A -Xfrontend -experimental-skip-all-function-bodies -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NEVERTYPECHECK %s
|
|
// RUN: %target-build-swift -Xfrontend -disable-availability-checking -emit-module -module-name A -Xfrontend -experimental-skip-non-inlinable-function-bodies -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NEVERTYPECHECK %s
|
|
|
|
protocol Base {
|
|
func anything()
|
|
}
|
|
|
|
func test() {
|
|
struct Nested : Base {
|
|
let NEVERTYPECHECK_property = 1
|
|
|
|
func anything() {
|
|
let NEVERTYPECHECK_local = 1
|
|
}
|
|
|
|
func opaqueReturnType() -> some Base {
|
|
let NEVERTYPECHECK_local = 1
|
|
return Nested()
|
|
}
|
|
}
|
|
}
|