Ticket #43467

'local var' is available in POSIX mode

Open Date: 2021-12-23 16:11 Last Update: 2021-12-26 12:01

Reporter:
(Anonymous)
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

sample:

  1. func() {
  2. local a=123
  3. echo $a
  4. }
  5. func

command used to reproduce the bug:

yash -o posixlycorrect path/to/sample/script

output:

123 (no error)

expected behavior:

local isn't posix and yash should exit with fatal error

Ticket History (2/2 Histories)

2021-12-23 16:11 Updated by: None
  • New Ticket "'local var' is available in POSIX mode" created
2021-12-26 12:01 Updated by: magicant
Comment

Affected built-ins:

  • bindkey
  • complete
  • dirs
  • disown
  • help
  • history
  • local
  • popd
  • pushd
  • suspend
  • typeset

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login