tests: Add a test for altering inherited property.
Intuitively, it should be possible to alter an inherited property (such
as change the default, etc.).
@@ -2482,6 +2482,29 @@ class TestEdgeQLDDL(tb.DDLTestCase):
SELECT test::Owner.<owner;
""", [{}])
+ @test.xfail('''
+ The error is: reference to a non-existent schema item
+
+ This is unintuitive, as the test::InhTest04_child should have
+ the inherited property 'testp'.
+ ''')
+ async def test_edgeql_ddl_inheritance_alter_04(self):
+ await self.con.execute(r"""
+ CREATE TYPE test::InhTest04 {
+ CREATE PROPERTY testp -> int64;
+ };
+
+ CREATE TYPE test::InhTest04_child EXTENDING test::InhTest04;
+ """)
+
+ await self.con.execute(r"""
+ ALTER TYPE test::InhTest04_child {
+ ALTER PROPERTY testp {
+ SET default := 42;
+ };
+ };
+ """)
+
@test.xfail('''
The error is:
