[
https://bro-tracker.atlassian.net/browse/BIT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606#comment-17606
]
Jon Siwek commented on BIT-1233:
--------------------------------
Wasn't immediately seeing an easy way to make it work. Maybe take a look at
topic/jsiwek/outer_param_binding and see if that's a decent way to detect it
and raise an error for now.
> Parameters inside dynamically instantiated functions bind incorrectly
> ---------------------------------------------------------------------
>
> Key: BIT-1233
> URL: https://bro-tracker.atlassian.net/browse/BIT-1233
> Project: Bro Issue Tracker
> Issue Type: Problem
> Components: Bro
> Affects Versions: git/master
> Reporter: Robin Sommer
> Labels: language
>
> The example below should print "2 1", but prints "2 2". I'm not sure if we
> can actually fix that easily, but if not it should at least print an error
> message that binding to outer parameters isn't supported.
> {noformat}
> type Foo: record {
> x: function(a: string) : string;
> };
> function bar(b: string)
> {
> local f: Foo;
> f = [$x=function(a: string) : string
> {
> return cat(a, " ", b);
> }
> ];
> print f$x("2");
> }
> event bro_init()
> {
> bar("1");
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4-OD-03-010#64001)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev