mirror of
https://github.com/maxkratz/edgedb.git
synced 2024-09-16 18:59:05 +00:00
Fix a scalar type dependecy bug.
Scalar types didn't trace dependecies based on their base types.
This commit is contained in:
parent
6e7a350d42
commit
cb3d6ca2f9
2 changed files with 17 additions and 0 deletions
|
@ -552,6 +552,15 @@ def trace_layout_Schema(
|
|||
trace_layout(decl, ctx=ctx)
|
||||
|
||||
|
||||
@trace_layout.register
|
||||
def trace_layout_CreateScalarType(
|
||||
node: qlast.CreateScalarType,
|
||||
*,
|
||||
ctx: LayoutTraceContext,
|
||||
) -> None:
|
||||
_trace_item_layout(node, ctx=ctx)
|
||||
|
||||
|
||||
@trace_layout.register
|
||||
def trace_layout_CreateObjectType(
|
||||
node: qlast.CreateObjectType,
|
||||
|
|
|
@ -1590,6 +1590,14 @@ class TestSchema(tb.BaseSchemaLoadTest):
|
|||
}
|
||||
"""
|
||||
|
||||
def test_schema_scalar_order_01(self):
|
||||
# Make sure scalar types account for base types when tracing SDL
|
||||
# dependencies.
|
||||
"""
|
||||
scalar type two extending one;
|
||||
scalar type one extending str;
|
||||
"""
|
||||
|
||||
def test_schema_property_cardinality_alter_01(self):
|
||||
schema = self.load_schema('''
|
||||
type Foo {
|
||||
|
|
Loading…
Reference in a new issue