Skip to content

Commit 4ea5aea

Browse files
committed
Merge commit '13a8e5d9406f' from swift/release/5.3 into swift/master
Conflicts: lldb/source/Expression/Materializer.cpp
2 parents d918e1d + 13a8e5d commit 4ea5aea

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SWIFT_SOURCES := main.swift
2+
3+
include Makefile.rules
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
from lldbsuite.test.lldbtest import *
3+
from lldbsuite.test.decorators import *
4+
5+
6+
class TestSwiftProtocolExtensionSelf(TestBase):
7+
8+
mydir = TestBase.compute_mydir(__file__)
9+
10+
@swiftTest
11+
def test(self):
12+
"""Test that the generic self in a protocol extension works in the expression evaluator.
13+
"""
14+
self.build()
15+
16+
lldbutil.run_to_source_breakpoint(self, "break here",
17+
lldb.SBFileSpec('main.swift'))
18+
self.expect("e f", substrs=[' = 12345'])
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class C : CP {
2+
let f: Int = 12345
3+
}
4+
5+
protocol CP : class {}
6+
7+
extension CP {
8+
func foo() {
9+
print(self) // break here
10+
}
11+
}
12+
13+
C().foo()

0 commit comments

Comments
 (0)