Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class A {
  2. let x : Int
  3. init() {
  4. self.x = assign(1)
  5. }
  6. func assign(y : Int) -> Int {
  7. return y
  8. }
  9. }
  10.  
  11. class A {
  12. var variable : Int
  13.  
  14. init() {
  15.  
  16. self.variable = A.assign(1)
  17.  
  18. }
  19.  
  20. private class func assign(y : Int) -> Int {
  21. return y
  22. }
  23. }
  24.  
  25. func compute(y: Int) -> Int {
  26. return y
  27. }
  28.  
  29. class A {
  30. let x: Int
  31.  
  32. static func assign(y: Int) -> Int {
  33. return y
  34. }
  35.  
  36. init () {
  37. x = A.assign(3) + compute(4)
  38. }
  39. }
  40.  
  41. class A {
  42. var x : Int!
  43. init() {
  44. x = assign(1)
  45. }
  46. func assign(y : Int) -> Int {
  47. return y
  48. }
  49. }
  50.  
  51. class A {
  52. let x : Int
  53. init() {
  54. func assign(y : Int) -> Int {
  55. return y
  56. }
  57. self.x = assign(y: 1)
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement