Skip to content

Commit d5428af

Browse files
wechmannikola-matic
authored andcommitted
Make the message about name not referring to a user-defined type more generic
1 parent c297183 commit d5428af

13 files changed

+13
-13
lines changed

libsolidity/analysis/DeclarationTypeChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void DeclarationTypeChecker::endVisit(UserDefinedTypeName const& _typeName)
190190
m_errorReporter.fatalTypeError(
191191
5172_error,
192192
_typeName.location(),
193-
"Name has to refer to a struct, enum or contract."
193+
"Name has to refer to a user-defined type."
194194
);
195195
}
196196
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
error E(uint);
22
function f(E x) pure returns (uint) {}
33
// ----
4-
// TypeError 5172: (26-27): Name has to refer to a struct, enum or contract.
4+
// TypeError 5172: (26-27): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/errors/using_2.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ contract C {
99
}
1010
}
1111
// ----
12-
// TypeError 5172: (91-92): Name has to refer to a struct, enum or contract.
12+
// TypeError 5172: (91-92): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/errors/weird3.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ contract C {
44
E x;
55
}
66
// ----
7-
// TypeError 5172: (29-30): Name has to refer to a struct, enum or contract.
7+
// TypeError 5172: (29-30): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/errors/weird4.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ contract C {
66
}
77
}
88
// ----
9-
// TypeError 5172: (64-65): Name has to refer to a struct, enum or contract.
9+
// TypeError 5172: (64-65): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/iceRegressionTests/identifier_collision_return_declare.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ contract C {
22
function ( uint ) external returns ( a [ ] calldata ) public a = ( 1 / 2 ) ;
33
}
44
// ----
5-
// TypeError 5172: (58-59): Name has to refer to a struct, enum or contract.
5+
// TypeError 5172: (58-59): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/nameAndTypeResolution/291_modifier_is_not_a_valid_typename.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ contract test {
66
}
77
}
88
// ----
9-
// TypeError 5172: (77-80): Name has to refer to a struct, enum or contract.
9+
// TypeError 5172: (77-80): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/nameAndTypeResolution/292_modifier_is_not_a_valid_typename_is_not_fatal.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ contract test {
77
}
88
}
99
// ----
10-
// TypeError 5172: (77-80): Name has to refer to a struct, enum or contract.
10+
// TypeError 5172: (77-80): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/nameAndTypeResolution/293_function_is_not_a_valid_typename.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ contract test {
77
}
88
}
99
// ----
10-
// TypeError 5172: (85-88): Name has to refer to a struct, enum or contract.
10+
// TypeError 5172: (85-88): Name has to refer to a user-defined type.

test/libsolidity/syntaxTests/scoping/name_shadowing_function_parameter_vs_struct_enum.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ contract C {
1717
// Warning 2519: (207-226): This declaration shadows an existing declaration.
1818
// Warning 2519: (228-254): This declaration shadows an existing declaration.
1919
// Warning 2519: (314-327): This declaration shadows an existing declaration.
20-
// TypeError 5172: (104-114): Name has to refer to a struct, enum or contract.
20+
// TypeError 5172: (104-114): Name has to refer to a user-defined type.

0 commit comments

Comments
 (0)