Mercurial > hg > octave-lyh
diff src/pt-fcn-handle.cc @ 8045:24701aa75ecb
scope fixes for anonymous and inline functions that appear inside subfunctions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 20 Aug 2008 15:57:14 -0400 |
parents | 2fd4a5ef6b59 |
children | 73c4516fae10 |
line wrap: on
line diff
--- a/src/pt-fcn-handle.cc +++ b/src/pt-fcn-handle.cc @@ -114,7 +114,13 @@ if (curr_fcn) { uf->stash_parent_fcn_name (curr_fcn->name ()); - uf->stash_parent_fcn_scope (curr_fcn->scope ()); + + symbol_table::scope_id parent_scope = curr_fcn->parent_fcn_scope (); + + if (parent_scope < 0) + parent_scope = curr_fcn->scope (); + + uf->stash_parent_fcn_scope (parent_scope); } uf->mark_as_inline_function ();