new syntax: comments from review

This commit is contained in:
Olivier Goffart 2022-10-18 11:53:28 +02:00 committed by Olivier Goffart
parent fd23745c02
commit b24a2d6a57
3 changed files with 11 additions and 12 deletions

View file

@ -900,7 +900,7 @@ impl Element {
if !valid_assign {
diag.push_error(
format!(
"animating {} property '{}'",
"Cannot animate {} property '{}'",
lookup_result.property_visibility, unresolved_prop_name
),
&prop_name_token,
@ -1191,7 +1191,7 @@ impl Element {
{
diag.push_error(
format!(
"assigning to {} property '{}'",
"Cannot assign to {} property '{}'",
lookup_result.property_visibility, unresolved_name
),
&name_token,

View file

@ -30,7 +30,7 @@ component Compo inherits Rectangle {
]
animate input1 {}
// ^error{animating input property 'input1'}
// ^error{Cannot animate input property 'input1'}
}
OldCompo := Rectangle {
@ -56,27 +56,27 @@ component Foo inherits Rectangle {
c1 := OldCompo {
inout2: 42;
priv2: 55;
// ^error{assigning to private property 'priv2'}
// ^error{Cannot assign to private property 'priv2'}
output1: 855;
// ^error{assigning to output property 'output1'}
// ^error{Cannot assign to output property 'output1'}
input1: 12;
inout1: 78;
animate output1 {}
// ^error{animating output property 'output1'}
// ^error{Cannot animate output property 'output1'}
animate priv2 {}
// ^error{animating private property 'priv2'}
// ^error{Cannot animate private property 'priv2'}
}
c2 := Compo {
priv1: 42;
// ^error{assigning to private property 'priv1'}
// ^error{Cannot assign to private property 'priv1'}
priv2: 55;
// ^error{assigning to private property 'priv2'}
// ^error{Cannot assign to private property 'priv2'}
output1: 585;
// ^error{assigning to output property 'output1'}
// ^error{Cannot assign to output property 'output1'}
input1: 12;
inout1: 78;
}