diff --git a/test/libyul/yulSyntaxTests/invalid_type.yul b/test/libyul/yulSyntaxTests/invalid_type.yul new file mode 100644 index 000000000..ec16ebf01 --- /dev/null +++ b/test/libyul/yulSyntaxTests/invalid_type.yul @@ -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). diff --git a/test/libyul/yulSyntaxTests/invalid_type2.yul b/test/libyul/yulSyntaxTests/invalid_type2.yul new file mode 100644 index 000000000..04593e666 --- /dev/null +++ b/test/libyul/yulSyntaxTests/invalid_type2.yul @@ -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. diff --git a/test/libyul/yulSyntaxTests/invalid_type3.yul b/test/libyul/yulSyntaxTests/invalid_type3.yul new file mode 100644 index 000000000..cf92ce7b8 --- /dev/null +++ b/test/libyul/yulSyntaxTests/invalid_type3.yul @@ -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). diff --git a/test/libyul/yulSyntaxTests/invalid_type4.yul b/test/libyul/yulSyntaxTests/invalid_type4.yul new file mode 100644 index 000000000..faf217a88 --- /dev/null +++ b/test/libyul/yulSyntaxTests/invalid_type4.yul @@ -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).