Files
swift-mirror/test/attr/attr_silgen_name.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

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)
}