Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lldb/test/API/lang/swift/nested_generic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SWIFT_SOURCES := main.swift

include Makefile.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import lldb
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbtest as lldbtest
import lldbsuite.test.lldbutil as lldbutil


class TestSwiftNestedGeneric(lldbtest.TestBase):
@swiftTest
def test(self):
"""Test the inline array synthetic child provider and summary"""
self.build()
lldbutil.run_to_source_breakpoint(
self, "break here", lldb.SBFileSpec("main.swift")
)

self.runCmd("settings set symbols.swift-enable-ast-context false")
self.expect(
"frame variable v",
substrs=[
"HoldsNonNamespacedNestedStruct.NamespacedNestingStruct<Int>",
"nested = 42",
],
)
13 changes: 13 additions & 0 deletions lldb/test/API/lang/swift/nested_generic/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class HoldsNonNamespacedNestedStruct {
struct NamespacedNestingStruct<T> {
let nested: T
}

}

func f() {
let v = HoldsNonNamespacedNestedStruct.NamespacedNestingStruct<Int>(nested: 42)
print(v) // break here
}

f()