mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AutoDiff] Add SR-12526 negative test.
Add negative test for SR-12526: `@derivative` attribute cross-module deserialization crash.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module -primary-file %S/Inputs/a.swift -emit-module-path %t/a.swiftmodule
|
||||
// RUN: %target-swift-frontend -emit-module -primary-file %S/Inputs/b.swift -emit-module-path %t/b.swiftmodule -I %t
|
||||
// RUN: not --crash %target-swift-frontend-typecheck -verify -I %t %s
|
||||
|
||||
// SR-12526: Fix cross-module deserialization crash involving `@derivative` attribute.
|
||||
|
||||
import a
|
||||
import b
|
||||
|
||||
func foo(_ s: Struct) {
|
||||
_ = Struct()
|
||||
_ = s.method(1)
|
||||
}
|
||||
Reference in New Issue
Block a user