1import lldb
2from lldbsuite.test.decorators import *
3from lldbsuite.test.lldbtest import *
4from lldbsuite.test import lldbutil
5
6
7class TestCase(TestBase):
8    def test(self):
9        """
10        Test debugging a binary that has two templates with the same name
11        but different template parameters.
12        """
13        self.build()
14        lldbutil.run_to_source_breakpoint(
15            self, "// break here", lldb.SBFileSpec("main.cpp")
16        )
17
18        # Try using both templates in the same expression. This shouldn't crash.
19        self.expect_expr("Template1.x + Template2.x", result_type="int")
20