Compile time polymorphism

Run Settings
LanguageSwift
Language Version
Run Command
class Arithmetic { func add(_ valueA: Int, _ valueB: Int) -> Int { return valueA + valueB } func add(_ valueA: UInt64, _ valueB: UInt64) -> UInt64 { return valueA + valueB } func add(_ valueA: Int, _ valueB: UInt64) -> UInt64 { return UInt64(valueA) + valueB } func add(_ valueA: UInt64, _ valueB: Int) -> UInt64 { return valueA + UInt64(valueB) } }
class Add : Arithmetic { override func add(_ valueA: Int, _ valueB: Int) -> Int { print("Calculate!") return super.add(valueA, valueB) } }
Editor Settings
Theme
Key bindings
Full width
Lines