Default parameter is not leveraged when the variable that is assigned the function with the default argument is called #65092
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
default arguments
Feature: default arguments for value parameters
expressions
Feature: expressions
function parameters
Feature → declarations: function parameters
function types
Feature → types: function types
function values
Feature → expressions: function values
not a bug
Resolution → not a bug: Reported as a bug but turned out to be expected behavior or programmer error
swift 5.8
type checker
Area → compiler: Semantic analysis
Description
Steps to reproduce
Expected behavior
showNum()
to print 10Environment
swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100) Target: arm64-apple-macosx13.0
Xcode 14.3 Build version 14E222b
macOS
The text was updated successfully, but these errors were encountered: