-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(rivet): rename special method
__drop__
to __destroy__
- Loading branch information
Showing
7 changed files
with
11 additions
and
11 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
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
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
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
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,4 @@ | ||
tests/invalid/directly_call_a_special_method.ri:9:5: error: cannot call a special method directly | ||
9 | d.__drop__(); | ||
| ^~~~~~~~~~~~ | ||
9 | d.__destroy__(); | ||
| ^~~~~~~~~~~~~~~ | ||
rivet: error: could not compile module `directly_call_a_special_method`, aborting due to previous error |
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,10 +1,10 @@ | ||
struct Dropper { | ||
func __drop__(self) { | ||
struct Destroyer { | ||
func __destroy__(self) { | ||
_ = self; | ||
} | ||
} | ||
|
||
func main() { | ||
d := Dropper(); | ||
d.__drop__(); | ||
d := Destroyer(); | ||
d.__destroy__(); | ||
} |
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,5 @@ | ||
struct SpecialMethods { | ||
func __drop__(self) { | ||
func __destroy__(self) { | ||
_ = self; | ||
} | ||
} |