待辦事項 #31677

想定外の戻り値

啟用日期: 2013-07-07 23:56 最後更新: 2013-07-08 13:40

回報者:
負責人:
(無)
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:

細節

次のプログラムで1が表示される。想定ではCond1末尾のreturnでnullが戻るはず。確認したリビジョンはr478です。

def CondBase
	return 1
end

def Cond1
	if ! CondBase
		return
	end
	
	return
end

Print(Cond1)

Ticket History (2/2 Histories)

2013-07-07 23:56 Updated by: darai
  • New Ticket "想定外の戻り値" created
2013-07-08 13:40 Updated by: panacoran
  • 元件 Update from (無) to trunk
  • 處理結果 Update from to 修正
  • 狀態 Update from 開啟 to 關閉
  • Ticket Close date is changed to 2013-07-08 13:40
  • 里程碑 Update from (無) to バージョン2.0
評語

式のないreturnの返値にnullを設定していなかったため、直近のreturnの返値がそのまま返っていました。r482で直しました。

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. » 登入