Skip to content

[SR-10472] Feature request: show generic type variables in Xcode's variables pane #4438

Open
@NSExceptional

Description

@NSExceptional
Previous ID SR-10472
Radar None
Original Reporter @NSExceptional
Type New Feature

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels New Feature
Assignee None
Priority Medium

md5: 3969b4dc93d426faa2ed68c5f5bb82eb

Issue Description:

Consider the following code:

func cast<T, U>(_ bar: T) -> U {
    return bar as! T
}

The variables pane will only show you a variable for bar (and self if this is a method). It would be so useful if T and U showed up as variables here too, relieving the developer from having to type po T.self (which often doesn't work) or from assigning a temporary variable to T.self. Generic type variables are implicit function parameters, after all.

I'm not sure how this could be incorporated into Playgrounds, but it would be nice to have something similar for Playgrounds as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions