iii
4.15.1 The *, /, %, –, <<, >>, >>>, &, ^, and | operators ...................................................................................... 57
4.15.2 The + operator .......................................................................................................................................................... 58
4.15.3 The <, >, <=, >=, ==, !=, ===, and !== operators ................................................................................... 58
4.15.4 The instanceof operator ........................................................................................................................................ 59
4.15.5 The in operator ......................................................................................................................................................... 59
4.15.6 The && operator ...................................................................................................................................................... 59
4.15.7 The || operator ........................................................................................................................................................... 59
4.16 The Conditional Operator .......................................................................................................................................... 60
4.17 Assignment Operators ................................................................................................................................................ 60
4.18 Contextually Typed Expressions .............................................................................................................................. 61
5 Statements .................................................................................................................................................................................. 63
5.1 Variable Statements ..................................................................................................................................................... 63
5.2 Return Statements ........................................................................................................................................................ 64
6 Functions ..................................................................................................................................................................................... 65
6.1 Function Declarations .................................................................................................................................................. 65
6.2 Function Overloads ...................................................................................................................................................... 65
6.3 Function Implementations ........................................................................................................................................ 66
6.4 Generic Functions ......................................................................................................................................................... 67
6.5 Code Generation ........................................................................................................................................................... 68
7 Interfaces ..................................................................................................................................................................................... 71
7.1 Interface Declarations ................................................................................................................................................. 71
7.2 Declaration Merging .................................................................................................................................................... 73
7.3 Interfaces Extending Classes ..................................................................................................................................... 73
7.4 Dynamic Type Checks ................................................................................................................................................. 74
8 Classes .......................................................................................................................................................................................... 75
8.1 Class Declarations ......................................................................................................................................................... 75
8.1.1 Class Heritage Specification ................................................................................................................................ 76
8.1.2 Class Body ................................................................................................................................................................... 77
8.2 Members........................................................................................................................................................................... 78
8.2.1 Instance and Static Members .............................................................................................................................. 78
8.2.2 Accessibility ................................................................................................................................................................ 78
8.2.3 Inheritance and Overriding .................................................................................................................................. 78
8.2.4 Class Types ................................................................................................................................................................. 79
8.2.5 Constructor Function Types ................................................................................................................................. 80
8.3 Constructor Declarations ........................................................................................................................................... 81
8.3.1 Constructor Parameters ......................................................................................................................................... 82
8.3.2 Super Calls .................................................................................................................................................................. 82
8.3.3 Automatic Constructors ........................................................................................................................................ 83
8.4 Member Declarations .................................................................................................................................................. 83
8.4.1 Member Variable Declarations ........................................................................................................................... 84
8.4.2 Member Function Declarations .......................................................................................................................... 85