Merge pull request #70987 from vonagam/fix-parameter-conversion-assign

This commit is contained in:
George Marques
2023-01-12 11:34:13 -03:00
committed by GitHub
10 changed files with 56 additions and 12 deletions
@@ -0,0 +1,19 @@
func literal(x: float = 1):
print('x is ', x)
print('typeof x is ', typeof(x))
var inferring := 2
func inferred(x: float = inferring):
print('x is ', x)
print('typeof x is ', typeof(x))
var weakling = 3
func weak(x: float = weakling):
print('x is ', x)
print('typeof x is ', typeof(x))
func test():
literal()
inferred()
weak()
print('ok')
@@ -0,0 +1,8 @@
GDTEST_OK
x is 1
typeof x is 3
x is 2
typeof x is 3
x is 3
typeof x is 3
ok