Why is "ambiguous use of 'functionname'" appearing in swift?

Example:

func display() -> Int {
    return 5
}
func display() -> String {
    return "Hello"
}
let value = display()
This error comes up when there are multiple functions with the same name, and Swift can't determine which one you want to use.

Solution:

// Rename one of the functions or specify return type
let value: Int = display()

Beginner's Guide to Swift