-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): add check if overridden functions have super function
Fixes #1022
- Loading branch information
Showing
20 changed files
with
5,515 additions
and
15 deletions.
There are no files selected for viewing
5,325 changes: 5,325 additions & 0 deletions
5,325
src/types/__snapshots__/resolveDescriptors.spec.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
src/types/test-failed/override-for-non-existing-function-in-contract-from-base-trait.tact
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,7 @@ | ||
trait BaseTrait { | ||
fun bar() {} | ||
} | ||
|
||
trait Test { | ||
override fun foo() {} | ||
} |
12 changes: 12 additions & 0 deletions
12
...es/test-failed/override-for-non-existing-function-in-contract-with-multi-inheritance.tact
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,12 @@ | ||
trait BaseTrait {} | ||
trait T { | ||
fun bar() {} | ||
} | ||
|
||
trait T2 { | ||
fun baz() {} | ||
} | ||
|
||
contract Test with T, T2 { | ||
override fun foo() {} | ||
} |
5 changes: 5 additions & 0 deletions
5
...types/test-failed/override-for-non-existing-function-in-contract-without-inheritance.tact
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,5 @@ | ||
trait BaseTrait {} | ||
|
||
trait Test { | ||
override fun foo() {} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/types/test-failed/override-for-non-existing-function-in-contract.tact
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,6 @@ | ||
trait BaseTrait {} | ||
trait T {} | ||
|
||
trait Test with T { | ||
override fun foo() {} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/types/test-failed/override-for-non-existing-function-in-trait-from-base-trait.tact
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,7 @@ | ||
trait BaseTrait { | ||
fun bar() {} | ||
} | ||
|
||
contract Test { | ||
override fun foo() {} | ||
} |
12 changes: 12 additions & 0 deletions
12
...types/test-failed/override-for-non-existing-function-in-trait-with-multi-inheritance.tact
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,12 @@ | ||
trait BaseTrait {} | ||
trait T { | ||
fun bar() {} | ||
} | ||
|
||
trait T2 { | ||
fun baz() {} | ||
} | ||
|
||
trait Test with T, T2 { | ||
override fun foo() {} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/types/test-failed/override-for-non-existing-function-in-trait-without-inheritance.tact
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,5 @@ | ||
trait BaseTrait {} | ||
|
||
contract Test { | ||
override fun foo() {} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/types/test-failed/override-for-non-existing-function-in-trait.tact
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,6 @@ | ||
trait BaseTrait {} | ||
trait T {} | ||
|
||
contract Test with T { | ||
override fun foo() {} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/types/test/override-for-non-existing-function-in-contract-from-base-trait.tact
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,7 @@ | ||
trait BaseTrait { | ||
fun foo() {} | ||
} | ||
|
||
trait Test { | ||
override fun foo() {} | ||
} |
14 changes: 14 additions & 0 deletions
14
...verride-for-non-existing-function-in-contract-with-multi-inheritance-from-base-trait.tact
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,14 @@ | ||
trait BaseTrait { | ||
fun foo() {} | ||
} | ||
trait T { | ||
fun bar() {} | ||
} | ||
|
||
trait T2 { | ||
fun baz() {} | ||
} | ||
|
||
contract Test with T, T2 { | ||
override fun foo() {} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/types/test/override-for-non-existing-function-in-contract-with-multi-inheritance.tact
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,10 @@ | ||
trait BaseTrait {} | ||
trait T {} | ||
|
||
trait T2 { | ||
fun foo() {} | ||
} | ||
|
||
contract Test with T, T2 { | ||
override fun foo() {} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/types/test/override-for-non-existing-function-in-contract-without-inheritance.tact
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,5 @@ | ||
trait BaseTrait {} | ||
|
||
trait Test { | ||
fun foo() {} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/types/test/override-for-non-existing-function-in-contract.tact
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,8 @@ | ||
trait BaseTrait {} | ||
trait T { | ||
fun foo() {} | ||
} | ||
|
||
trait Test with T { | ||
override fun foo() {} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/types/test/override-for-non-existing-function-in-trait-from-base-trait.tact
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,7 @@ | ||
trait BaseTrait { | ||
fun foo() {} | ||
} | ||
|
||
contract Test { | ||
override fun foo() {} | ||
} |
14 changes: 14 additions & 0 deletions
14
...t/override-for-non-existing-function-in-trait-with-multi-inheritance-from-base-trait.tact
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,14 @@ | ||
trait BaseTrait { | ||
fun foo() {} | ||
} | ||
trait T { | ||
fun bar() {} | ||
} | ||
|
||
trait T2 { | ||
fun baz() {} | ||
} | ||
|
||
trait Test with T, T2 { | ||
override fun foo() {} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/types/test/override-for-non-existing-function-in-trait-with-multi-inheritance.tact
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,10 @@ | ||
trait BaseTrait {} | ||
trait T {} | ||
|
||
trait T2 { | ||
fun foo() {} | ||
} | ||
|
||
trait Test with T, T2 { | ||
override fun foo() {} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/types/test/override-for-non-existing-function-in-trait-without-inheritance.tact
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,5 @@ | ||
trait BaseTrait {} | ||
|
||
contract Test { | ||
fun foo() {} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/types/test/override-for-non-existing-function-in-trait.tact
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,8 @@ | ||
trait BaseTrait {} | ||
trait T { | ||
fun foo() {} | ||
} | ||
|
||
contract Test with T { | ||
override fun foo() {} | ||
} |