Skip to content

[SR-13208] LLDB fails to evaluate expressions inside class-bound protocol extensions #4423

@augusto2112

Description

@augusto2112
Previous ID SR-13208
Radar None
Original Reporter @augusto2112
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee @augusto2112
Priority Medium

md5: cf5cfd21acc58d5eb0b8c94e4b580a55

Issue Description:

LLDB fails to run any expression inside a default implementation of a class-bound protocol where there are no references to self.

Minimal example :

class C : CP {}

protocol CP : class {
  func foo()
}
extension CP {
  func foo() {
    print(1) // breakpoint here
  }
}

C().foo() 

LLDB:

b test.swift:8
e 1 // (evaluate anything here) 

Output:

error: <EXPR>:4:3: error: 'mutating' isn't valid on methods in classes or class-bound protocols
  mutating func $__lldb_wrapped_expr_0(_ $__lldb_arg : UnsafeMutablePointer<Any>) {
  ^~~~~~~~~ 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions