Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12518] Couldn't lookup symbols error when using default function argument in REPL. #4472

Closed
swift-ci opened this issue Apr 5, 2020 · 1 comment
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

swift-ci commented Apr 5, 2020

Previous ID SR-12518
Radar rdar://problem/62201694
Original Reporter palle (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
macOS 10.15.4 (19E266)

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: e7ef19902d0508f1ace6b90b468f4cb3

Issue Description:

It is not possible to declare a function with a default argument and then call it without providing a value for the default argument in the REPL. Doing so will result in a symbol lookup error for the default argument.

Minimal example:

$ swift
Welcome to Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29).
Type :help for assistance.
  1> func foo(bar: Int = 42) { 
  2.     print(bar) 
  3. } 
  4> foo()
error: Couldn't lookup symbols:
  default argument 0 of __lldb_expr_1.foo(bar: Swift.Int) -> ()
@beccadax
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

2 participants