Files
swift-mirror/test/IDE/complete_stdlib_builtin.swift
Nathan Hawes 35a9d681f3 [Sema] TypeCheckNodeAtLoc: strip out the implicit return the parser adds to single expression bodies for void-returning functions
This makes TypeCheckNodeAtLoc match the regular function body typechecking
behavior and fixes a crash in test/IDE/complete_value_expr.swift
2020-08-29 08:03:48 -07:00

19 lines
647 B
Swift

// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_1 | %FileCheck %s -check-prefix=NO_CRASH
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_2 | %FileCheck %s -check-prefix=NO_CRASH
// NO_CRASH-NOT: Begin completions
//===---
//===--- Test code completion for types from Builtin module.
//===---
// We don't give any useful completions, but we should not crash either.
func testBuiltinRawPointer1(a: UnsafeMutablePointer<UInt8>) {
a.value#^BUILTIN_1^#
}
func testBuiltinRawPointer2(a: UnsafeMutablePointer<UInt8>) {
a.value.#^BUILTIN_2^#
}