Files
swift-mirror/test/IDE/complete_generic_optional.swift
Dmitri Gribenko ef4249bbc4 stdlib: set the right displayStyle in Optional's Mirror
Optional's Mirror (the default one) used to report the display style as
"enum", which is technically correct, but we have a more specific style
for Optional.

<rdar://problem/24450196>
2016-04-29 13:53:38 -07:00

17 lines
589 B
Swift

// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OPTIONAL_1 | FileCheck %s -check-prefix=FOO_OPTIONAL_1
struct Bar {
}
struct Foo<T> {
func myFunction(_ foobar: T) {
}
}
// SR-642 Code completion does not instantiate generic arguments of a type wrapped in an optional
let x: Foo<Bar>? = Foo<Bar>()
x.#^FOO_OPTIONAL_1^#
// FOO_OPTIONAL_1: Begin completions, 6 items
// FOO_OPTIONAL_1-DAG: Decl[InstanceMethod]/CurrNominal/Erase[1]: ?.myFunction({#(foobar): Bar#})[#Void#]; name=myFunction(foobar: Bar)
// FOO_OPTIONAL_1: End completions