Files
swift-mirror/test/Serialization/load-invalid.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

20 lines
812 B
Swift

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: touch %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'a' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'abcd' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'abcde' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
import new_module // expected-error{{malformed module file}}
// malformed module files produce an empty module to avoid further errors.
new_module.foo() // expected-error {{module 'new_module' has no member named 'foo'}}