mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 16:00:59 +00:00
disallow circular struct references (#8851)
* detect and fail for circular struct dependencies * pr comments * pr comment
This commit is contained in:
@@ -71,3 +71,12 @@ class SchemaTests:
|
||||
schema_json["enums"][0]["values"][2]["attributes"][1]["value"]
|
||||
== "Value 3 (deprecated)"
|
||||
)
|
||||
|
||||
def CircularStructDependency(self):
|
||||
try:
|
||||
flatc(["-c", "circular_struct_dependency.fbs"])
|
||||
assert False, "Expected flatc to fail on circular struct dependency"
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
flatc(["-c", "circular_table.fbs"])
|
||||
Reference in New Issue
Block a user