-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ada86d6
commit 1f5e6ee
Showing
6 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
compiler/ballerina-parser/src/test/resources/declarations/class-def/class_def_source_13.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
class Foo { | ||
*; | ||
|
||
string name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...c/test/resources/declarations/class-definition/assert/class_definition_declaration_19.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
type Vehicle object { | ||
function kind() returns string; | ||
}; | ||
|
||
type Tesla object { | ||
function model() returns string; | ||
}; | ||
|
||
class CyberTruck { | ||
*Vehicle; | ||
|
||
string name; | ||
int wheels; | ||
|
||
public function init(string name, int wheels) { | ||
self.name = name; | ||
self.wheels = wheels; | ||
} | ||
|
||
function kind() returns string { | ||
return "car"; | ||
} | ||
|
||
*Tesla; | ||
|
||
function model() returns string { | ||
return "tesla"; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...rc/test/resources/declarations/class-definition/assert/class_definition_declaration_2.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
class Person { | ||
*A; | ||
|
||
public int age = 10; | ||
|
||
function foo() returns int { | ||
|
31 changes: 31 additions & 0 deletions
31
...c/test/resources/declarations/class-definition/source/class_definition_declaration_19.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
type Vehicle object { | ||
function kind() returns string; | ||
}; | ||
|
||
type Tesla object { | ||
function model() returns string; | ||
}; | ||
|
||
class CyberTruck { | ||
*Vehicle; | ||
string name; | ||
int wheels; | ||
|
||
public function init(string name, int wheels) { | ||
self.name = name; | ||
self.wheels = wheels; | ||
} | ||
function kind() returns string { | ||
return "car"; | ||
} | ||
|
||
|
||
|
||
*Tesla; | ||
|
||
|
||
|
||
function model() returns string { | ||
return "tesla"; | ||
} | ||
} |