Detect loop on the property itself

This is the most basic loop and we wouldn't show a signal.

Turn out the comment was wrong and we do not seem to emit the error
twice for two ways binding to itself

Fixes #1407
This commit is contained in:
Olivier Goffart 2022-07-22 12:52:56 +02:00 committed by Olivier Goffart
parent 3639ba2644
commit 57d61475b3
2 changed files with 13 additions and 2 deletions

View file

@ -31,6 +31,10 @@ T3 := Rectangle {
}
}
T4 := Rectangle {
property <length> my_property <=> x;
}
App := Rectangle {
@ -40,5 +44,8 @@ App := Rectangle {
// ^error{The binding for the property 'foo' is part of a binding loop}
T3 { hello: al; }
// ^error{The binding for the property 'hello' is part of a binding loop}
T4 { my_property: my_property; }
// ^error{Property 'my-property' cannot refer to itself}
}
}