<< Back to previous view

[TANAL-114] Inconsistent docs for 'state' argument to 'schedule' Created: 08/Oct/15  Updated: 09/Oct/15  Resolved: 09/Oct/15

Status: Closed
Project: tools.analyzer
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Stuart Sierra Assignee: Nicola Mometto
Resolution: Completed Votes: 0
Labels: None


In the docstring for schedule, tools/analyzer/passes.clj#L198 says

   * :state    a no-arg function that should return the init value of an atom that will be
               passed as the first argument to the pass ...

But the 'state' argument doesn't seem to get initialized with an atom. The object returned by the :state function gets passed through unchanged.

I can only find one usage, in tools/analyzer/passes/add_binding_atom.clj#L18, where the :state function itself creates and returns an atom.

Comment by Nicola Mometto [ 09/Oct/15 4:20 AM ]

The documentation is wrong here, the :state function should return an atom.
I'll fix the docstring this evening, thanks

Comment by Stuart Sierra [ 09/Oct/15 10:57 AM ]

Thanks for such a quick response!

Comment by Nicola Mometto [ 09/Oct/15 1:40 PM ]


Generated at Sat Oct 10 00:20:07 CDT 2015 using JIRA 4.4#649-r158309.