mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This includes proper rules for function overloads (i.e. shadowing by type) and allowing type lookup to find a type even if it has the same name as a non-type. lookupVisibleDecls does not use this behavior yet. Swift SVN r7016
11 lines
394 B
Swift
11 lines
394 B
Swift
func something(obj : Int) -> Int { return obj }
|
|
func something(a : Int, b : Int) -> (Int, Int) { return (a, b) }
|
|
func something(a : Int, b : Int, c : Int) -> (Int, Int, Int) { return (a, b, c) }
|
|
|
|
func ambiguousWithVar(val : Int) {}
|
|
func scopedVar(val : Int) {}
|
|
func localVar(val : Int) {}
|
|
func scopedFunction(val : Int) -> Int { return val }
|
|
|
|
func TypeNameWins(val : Int) -> Int { return val }
|