Files
swift-mirror/test/Serialization/top-level-code.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

14 lines
431 B
Swift

// RUN: rm -rf %t && mkdir -p %t
// RUN: %target-swift-frontend -emit-module -o %t %s -module-name Test
// RUN: llvm-bcanalyzer %t/Test.swiftmodule | %FileCheck %s
// RUN: cp %s %t/main.swift
// RUN: %target-swift-frontend -typecheck -verify %t/main.swift -primary-file %S/Inputs/top-level-code-other.swift
// CHECK-NOT: UnknownCode
let a: Int? = 1 // expected-note {{did you mean 'a'?}}
guard let b = a else {
fatalError()
}