待辦事項 #43467

'local var' is available in POSIX mode

啟用日期: 2021-12-23 16:11 最後更新: 2022-06-07 18:59

回報者:
(匿名)
負責人:
(無)
類型:
狀態:
開啟
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
檔案:
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

細節

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 (3/3 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
評語

Affected built-ins:

  • bindkey
  • complete
  • dirs
  • disown
  • help
  • history
  • local
  • popd
  • pushd
  • suspend
  • typeset
2022-06-07 18:59 Updated by: dumblob
評語

I second this request to fix this bug with local.

Attachment File List

No attachments

編輯

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