mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
17 lines
518 B
Swift
17 lines
518 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
@_silgen_name("foo") // expected-note {{attribute already specified here}}
|
|
@_silgen_name("bar") // expected-error {{duplicate attribute}}
|
|
func duplicateAsmName() {}
|
|
|
|
// Test parser recovery by having something that
|
|
// should parse fine.
|
|
func somethingThatShouldParseFine() {}
|
|
|
|
func func_with_nested__silgen_name() {
|
|
@_silgen_name("exit") // expected-error {{attribute '_silgen_name' can only be used in a non-local scope}}
|
|
func exit(_ code : UInt32) -> Void
|
|
exit(0)
|
|
}
|
|
|