-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reject duplicate built-in type definitions
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
test/libsolidity/syntaxTests/experimental/builtin/builtin_type_definition_duplicate.sol
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,17 @@ | ||
pragma experimental solidity; | ||
|
||
type void1 = __builtin("void"); | ||
type void2 = __builtin("void"); | ||
|
||
type word1 = __builtin("word"); | ||
type word2 = __builtin("word"); | ||
|
||
type fun1(T, U) = __builtin("fun"); | ||
type fun2(T, U) = __builtin("fun"); | ||
// ==== | ||
// EVMVersion: >=constantinople | ||
// ---- | ||
// Warning 2264: (0-29): Experimental features are turned on. Do not use experimental features on live deployments. | ||
// TypeError 9609: (63-94): Duplicate builtin type definition. | ||
// TypeError 9609: (128-159): Duplicate builtin type definition. | ||
// TypeError 9609: (197-232): Duplicate builtin type definition. |