Skip to content

Commit 51aca8a

Browse files
committed
Correct arity check in time.parse
1 parent ce37f57 commit 51aca8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

time.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,8 @@ func vfTimeParse(_ *goal.Context, args []goal.V) goal.V {
939939
}
940940
layout := string(layoutS)
941941
switch len(args) {
942+
case monadic:
943+
return goal.Panicf("time.parse : too few arguments (%d), expects 2 arguments", len(args))
942944
case dyadic:
943945
y := args[0]
944946
switch yv := y.BV().(type) {

0 commit comments

Comments
 (0)