Files
swift-mirror/test/NameBinding/Inputs/overload_intFunctions.swift
Jordan Rose 49fc1ba334 Implement proper shadowing rules for unqualified lookup.
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
2013-08-07 22:57:05 +00:00

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 }