Ticket #31677

想定外の戻り値

오픈 날짜: 2013-07-07 23:56 마지막 업데이트: 2013-07-08 13:40

Reporter:
소유자:
(None)
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None

Details

次のプログラムで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
  • Component Update from (None) to trunk
  • Resolution Update from None to Fixed
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2013-07-08 13:40
  • Milestone Update from (None) to バージョン2.0
댓글 올리기

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

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