Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- let x : Int
- init() {
- self.x = assign(1)
- }
- func assign(y : Int) -> Int {
- return y
- }
- }
- class A {
- var variable : Int
- init() {
- self.variable = A.assign(1)
- }
- private class func assign(y : Int) -> Int {
- return y
- }
- }
- func compute(y: Int) -> Int {
- return y
- }
- class A {
- let x: Int
- static func assign(y: Int) -> Int {
- return y
- }
- init () {
- x = A.assign(3) + compute(4)
- }
- }
- class A {
- var x : Int!
- init() {
- x = assign(1)
- }
- func assign(y : Int) -> Int {
- return y
- }
- }
- class A {
- let x : Int
- init() {
- func assign(y : Int) -> Int {
- return y
- }
- self.x = assign(y: 1)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement