2
0
Rob Loach 5 жил өмнө
parent
commit
8d596d8adb
1 өөрчлөгдсөн 14 нэмэгдсэн , 14 устгасан
  1. 14 14
      docs/class.md

+ 14 - 14
docs/class.md

@@ -144,25 +144,25 @@ There are many cases where nested classes can lead to more readable and maintain
 ### Inheritance
 Single class inheritance is supported in Gravity.
 ```swift
-class Bird {
-	func talk() {
-		System.print("Cheep")
+	class Bird {
+		func talk() {
+			System.print("Cheep")
+		}
 	}
-}
 
-class Owl : Bird {
-	func talk() {
-		System.print("Hoot")
+	class Owl : Bird {
+		func talk() {
+			System.print("Hoot")
+		}
 	}
-}
 
-func main() {
-	var bird = Bird()
-	bird.talk() // Output: Cheep
+	func main() {
+		var bird = Bird()
+		bird.talk() // Output: Cheep
 
-	var owl = Owl()
-	owl.talk() // Output: Hoot
-}
+		var owl = Owl()
+		owl.talk() // Output: Hoot
+	}
 ```
 
 ### Access specifiers