view test/bug-50014/duplicate_subfunction_separate_scope_ok.m @ 31216:f111d1caa73d stable

canonicalize_file_name: Trim trailing file separators from root of mapped network drive (bug #62847). * liboctave/system/file-ops.cc (canonicalize_file_name): Trim trailing file separators from root of mapped network drive before potentially replacing it in the canonicalized path.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 30 Aug 2022 18:26:30 +0200
parents 0c99b8c2e5bb
children
line wrap: on
line source

## Test that nested functions with the same name are OK if they are
## defined inside other nested functions with different names.

function retval = duplicate_subfunction_separate_scope_ok ()
  function r = suba ()
    function sub2 ()
      r = 1;
    endfunction
    sub2 ();
  endfunction
  function subb ()
    function sub2 ()
      y = 2;
    endfunction
    sub2 ();
  endfunction
  subb ();
  retval = y + suba ();
endfunction