forked from tact-lang/tact
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: user-friendly errors for undefined FunC functions (tact-lang#587)
- Loading branch information
Showing
5 changed files
with
38 additions
and
0 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
8 changes: 8 additions & 0 deletions
8
src/test/compilation-failed/contracts/func-function-does-not-exist.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 @@ | ||
@name(iDoNotExist) | ||
native youDo(); | ||
|
||
contract Test { | ||
get fun test() { | ||
youDo(); | ||
} | ||
} |
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 @@ | ||
import { __DANGER_resetNodeId } from "../../grammar/ast"; | ||
import { itShouldNotCompile } from "./util"; | ||
|
||
describe("func-errors", () => { | ||
beforeEach(() => { | ||
__DANGER_resetNodeId(); | ||
}); | ||
|
||
itShouldNotCompile({ | ||
testName: "func-function-does-not-exist", | ||
errorMessage: | ||
"Function 'iDoNotExist' does not exist in imported FunC sources", | ||
}); | ||
}); |
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