-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't name a template parameter one
#282
Comments
It seems like some things I wrote for the API documentation have disappeared, that's not good... Except if something has been done in the implementation to justify that. So what was written in my version of the documentation, is that when you use an attribute whose name begins with |
I can understand that the |
Well we need a way to differentiate callback attributes from normal attributes - because the expression context is different - and today this is done through a naming convention (i.e. callback attributes must start with
... which doesn't work today (but this should be a separate item in the backlog) |
@b-laporte correct if I am wrong, but I think that when we process the attributes at template usage, we know if:
|
@benouat for the regular templates we could deffer checks to the point where the event occurs but it would be a pity since we've got all the needed info at the compile time. That is - if we've got a way of identifying event handlers we've got an AST for the expression present in this attribute and we can verify that there is only function call (or an assignment later on). |
I've come across a weird behavior whenever I use
one
as the name of a sub-template parameter.This is the working code:
Now, for the funny stuff, if you replace
pone
byone
everywhere, the output becomes:this is [object Object] and two
...because for some reason, one's value is
{two:"two"}
If you invert
one
andtwo
, you'll get:this is two and
...because this time, one's value is undefined.
The text was updated successfully, but these errors were encountered: