Skip to content

Commit e12db35

Browse files
committed
Update basics.pk
add test for ThakeeNathees#278
1 parent 2d354a7 commit e12db35

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/lang/basics.pk

+15
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,18 @@ assert(Foo._docs == "Testing for\n class docstring")
187187

188188
# If we got here, that means all test were passed.
189189
print('All TESTS PASSED')
190+
191+
192+
def defaultArg
193+
return "hello"
194+
end
195+
196+
def defaultValueWithFunc(a = 10, b = a * 2, c = defaultArg())
197+
print(c, a, b)
198+
end
199+
200+
defaultValueWithFunc()
201+
defaultValueWithFunc(0)
202+
defaultValueWithFunc(5)
203+
defaultValueWithFunc(5, 100)
204+
defaultValueWithFunc(5, null, "hi")

0 commit comments

Comments
 (0)