Files
swift-mirror/test/Serialization/function-default-args.swift
Jordan Rose 0e10f89964 Preserve default argument text through serialization (#18579)
This allows us to dump it in the generated interface, though it's
still not syntax-highlighted. This is necessary for textual module
interfaces, but it's also just a longstanding request for Xcode's
"Generated Interface" / "Jump to Definition" feature.

rdar://problem/18675831
2018-08-09 11:06:22 -07:00

15 lines
641 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/Test~partial.swiftmodule -module-name Test -primary-file %s
// RUN: %target-swift-frontend -merge-modules -emit-module -o %t/Test.swiftmodule %t/Test~partial.swiftmodule
// RUN: %target-swift-ide-test -print-module -module-to-print=Test -source-filename=x -I %t | %FileCheck %s
// CHECK-LABEL: func testDefaultArguments(
public func testDefaultArguments(
// CHECK-SAME: normal: Int = 0
normal: Int = 0,
// CHECK-SAME: multiToken: Int = Int.max
multiToken: Int = Int.max,
// CHECK-SAME: special: Int = #line
special: Int = #line
) {}
// CHECK-SAME: )