Files
swift-mirror/test/Serialization/load-invalid-sourceinfo.swift
Ben Barham bfb9205c7c [Serialization] Add warning when .swiftsourceinfo is malformed
Output a warning rather than ignoring a malformed .swiftsourceinfo
completely.

Resolves rdar://77350048
2021-05-01 11:31:24 +10:00

18 lines
662 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift
// RUN: %target-swift-frontend -typecheck -I %t %s
// RUN: touch %t/empty.swiftsourceinfo
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
// RUN: echo -n 'a' > %t/empty.swiftsourceinfo
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
// RUN: echo -n 'abcd' > %t/empty.swiftsourceinfo
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
// RUN: echo -n 'abcde' > %t/empty.swiftsourceinfo
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
import empty // expected-warning{{unable to use malformed module source info}}