-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark pure function effects where necessary
- Loading branch information
Showing
7 changed files
with
23 additions
and
2 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
1 change: 1 addition & 0 deletions
1
tests/unused/UnusedCode/usedFunctionReferencedInClosure/output.txt
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 @@ | ||
ERROR: UnusedStatement - input.hack:6:5 - This statement has no effect and can be removed |
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
tests/unused/UnusedExpression/unusedPureMethodCall/input.hack
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,15 @@ | ||
class UnusedMethodClass { | ||
public function getId()[]: int { | ||
return 5; | ||
} | ||
|
||
public function doWork(): string { | ||
return ''; | ||
} | ||
} | ||
|
||
function foo(): void { | ||
$c = new UnusedMethodClass(); | ||
$c->getId(); | ||
$c->doWork(); | ||
} |
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 @@ | ||
ERROR: UnusedStatement - input.hack:13:5 - This statement has no effect and can be removed |