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
Unable to use more than one type argument #1894
Comments
Hmm, I thought I fixed this in #1738. There even is a trybuild test here: yew/packages/yew-macro/tests/html_macro/generic-component-pass.rs Lines 57 to 73 in 3180fc7
Edit: Maybe it's because of the |
Nope, I tried that at well. Didn't work. |
Ah, it might be that I accidentally did not properly test with |
Ok, I am confused now. The code you have seems to be on "master", but not in "0.18". Although the changes older than the "0.18" release. Anyway, I think it needs a bit more fixing :) It looks to me as if this only is a problem for the closing tag: pub fn test() {
// works
let _foo = html! {
<Foo<String,String>/>
};
// fails
let _foo = html! {
<Foo<String,String>>
</Foo<String,String>>
};
} |
And, it fails with both |
The commit probably didn't get cherry-picked onto the 0.18 release. Not sure why but you probably need to use a git dependency on master for now. Also the second code snippet that fails should also work on master. It's identical to the trybuild test. |
Ok, this is confusing. Especially as the version on master is still "0.17"!
I tried that with master, and indeed that works. |
@lukechu10 is there any date when the new release can be expected? |
Unfortunately I don't have any idea. I saw you on the discord server so maybe try asking there? |
Problem
Using more than one type argument in a component results in the follow error message during compilation:
Steps To Reproduce
Create a component with more than one type argument.
Expected behavior
I would expect this to work, like with a single type argument.
Workaround
There is a workaround, you can define a type alias and use this instead:
And then:
Environment:
0.17
,0.18
1.51
Questionnaire
The text was updated successfully, but these errors were encountered: