mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When printing its annotated decl, we would would assume the param's default value is present if the default value kind was "Normal". The type checker explicitly sets the default value to nullptr if it doesn't type check though, so we were crashing for that case. Added the check. Resolves rdar://problem/46694149
10 lines
322 B
Swift
10 lines
322 B
Swift
enum LogLevel { case error }
|
|
|
|
func logAsync(level: LogLevel = undefined, messageProducer producer
|
|
|
|
// RUN: %sourcekitd-test -req=cursor -pos=3:44 %s -- %s | %FileCheck %s
|
|
|
|
// CHECK: source.lang.swift.decl.function.free (3:6-3:68)
|
|
// CHECK: logAsync(level:messageProducer:)
|
|
// CHECK: LogLevel</Type> = <<empty>>
|