Files
swift-mirror/test/AutoDiff/Sema/DerivativeRegistrationCrossModule/main.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

19 lines
814 B
Swift

// 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
// "-verify-ignore-unknown" is for "<unknown>:0: note: 'init()' declared here"
// RUN: %target-swift-frontend-typecheck -verify -verify-ignore-unrelated -verify-ignore-unknown -I %t %s
// https://github.com/apple/swift/issues/54969
// Fix cross-module deserialization crash involving `@derivative` attribute.
import a
import b
func foo(_ s: Struct) {
// Without this error, the aforementioned issue does not trigger.
// expected-error @+1 {{'Struct' initializer is inaccessible due to 'internal' protection level}}
_ = Struct()
_ = s.method(1)
}