[SR-10517] Imported C Structs can't be subscripted with KeyPath #52917
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
key paths
Feature: key paths (both native and Objective-C)
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Xcode 10.2.1
Additional Detail from JIRA
md5: 71d802c8fef3eec1fbbfd9fc8dcdf5d1
Issue Description:
// C header
typedef struct { unsigned char c; } foo;
// Swift
let x = foo(c: 0)
let kp = \foo.c
let c = foo[kp] // value of type 'foo.Type' has no subscripts
I expect `foo[kp]` to return 0
The text was updated successfully, but these errors were encountered: