mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
19 lines
650 B
Swift
19 lines
650 B
Swift
// RUN: not %target-swift-frontend -typecheck -I %S/Inputs %s 2>%t.txt
|
|
// RUN: %FileCheck %s < %t.txt
|
|
// RUN: %FileCheck %s -check-prefix=NEGATIVE < %t.txt
|
|
|
|
// FIXME: We need to type-check transparent functions if they are used.
|
|
// XFAIL: *
|
|
|
|
// CHECK: transparent_invalid.swift:3:10: error: expression does not type-check
|
|
// NEGATIVE-NOT: transparent_invalid.swift:7:10: error
|
|
import transparent_invalid
|
|
|
|
var _ : Int = negate_bad(5) // no-warning
|
|
|
|
// NEGATIVE-NOT: import_source.swift:[[@LINE+1]]
|
|
var _ : Int = negate(5) // no-warning
|
|
|
|
// CHECK: import_source.swift:[[@LINE+1]]:22: error: 'CBool' is not a subtype of 'Int'
|
|
var _ : Int = negate(true)
|