mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests for invalid types.
This commit is contained in:
parent
6eec968365
commit
9140bc52c4
7
test/libyul/yulSyntaxTests/invalid_type.yul
Normal file
7
test/libyul/yulSyntaxTests/invalid_type.yul
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
let x: invalidType
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// TypeError: (10-24): "invalidType" is not a valid type (user defined types are not yet supported).
|
8
test/libyul/yulSyntaxTests/invalid_type2.yul
Normal file
8
test/libyul/yulSyntaxTests/invalid_type2.yul
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
let x := 1:invalidType
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// TypeError: (15-28): "invalidType" is not a valid type (user defined types are not yet supported).
|
||||
// TypeError: (10-11): Assigning value of type "invalidType" to variable of type "u256.
|
8
test/libyul/yulSyntaxTests/invalid_type3.yul
Normal file
8
test/libyul/yulSyntaxTests/invalid_type3.yul
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
function f(a: invalidType) -> b: invalidType {}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// TypeError: (17-31): "invalidType" is not a valid type (user defined types are not yet supported).
|
||||
// TypeError: (36-50): "invalidType" is not a valid type (user defined types are not yet supported).
|
9
test/libyul/yulSyntaxTests/invalid_type4.yul
Normal file
9
test/libyul/yulSyntaxTests/invalid_type4.yul
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
switch 1
|
||||
case 8: invalidType {}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// TypeError: (24-38): Expected a value of type "u256" but got "invalidType"
|
||||
// TypeError: (24-38): "invalidType" is not a valid type (user defined types are not yet supported).
|
Loading…
Reference in New Issue
Block a user