You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote that with the intent to create the following output for each prop:
Arrays.hashCode(value)
It seems that the generated code would not compile because the .hashCode after @hasher is inferred to be a hashCode method invocation on java object hasher. How do I express my intent?
The following variations work but they come with undesired side effects. @hasher. hashCode(@prop.get("key")) produces Arrays .hashCode(value) but of course with the extra space.
{@hasher}.hashCode(@prop.get("key")) produces {Arrays}.hashCode(value) with extra curly braces.
Need an elegant way out without having to do major overhaul.
The text was updated successfully, but these errors were encountered:
243826
changed the title
Ability to specify end tag to avoid automatic incorrect inference
Ability to specify end tag to avoid automatic incorrect/undesired inference
Mar 9, 2019
On Sat, Mar 9, 2019 at 1:20 AM Chetan Narsude ***@***.***> wrote:
Consider the following rocker snippet simplified to exemplify the problem:
@for((i, prop): props) {
@with(String hasher = "Arrays") {
@***@***.***("key"))
}
}
I wrote that with the intent to create the following output for each prop:
Arrays.hashCode(value)
It seems that the generated code would not compile because the .hashCode
after @hasher is inferred to be a hashCode method invocation on java
object hasher. How do I express my intent?
The following variations work but they come with undesired side effects.
@hasher. ***@***.***("key")) produces Arrays .hashCode(value) but
of course with the extra space.
***@***.******@***.***("key")) produces {Arrays}.hashCode(value)
with extra curly braces.
Need an elegant way out without having to do major overhaul.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#103>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjwAjzMy8sL6Eosju2N-_FuAcxXWzRPks5vU1K7gaJpZM4bmgxf>
.
Consider the following rocker snippet simplified to exemplify the problem:
I wrote that with the intent to create the following output for each prop:
It seems that the generated code would not compile because the
.hashCode
after@hasher
is inferred to be ahashCode
method invocation on java objecthasher
. How do I express my intent?The following variations work but they come with undesired side effects.
@hasher. hashCode(@prop.get("key"))
producesArrays .hashCode(value)
but of course with the extra space.{@hasher}.hashCode(@prop.get("key"))
produces{Arrays}.hashCode(value)
with extra curly braces.Need an elegant way out without having to do major overhaul.
The text was updated successfully, but these errors were encountered: