Although avoid this check for simple-generic accesses where this would be
too strict and not wanted.
https://bugzilla.gnome.org/show_bug.cgi?id=775466
}
}
+ public void check_type_arguments (MemberAccess access) {
+ foreach (var type_arg in access.get_type_arguments ()) {
+ check_type (type_arg);
+ check_type_argument (type_arg);
+ }
+ }
+
void check_type_argument (DataType type_arg) {
if (type_arg is GenericType
|| type_arg is PointerType
if (itype is MethodType) {
assert (ma != null);
m = ((MethodType) itype).method_symbol;
+
+ if (!get_ccode_simple_generics (m)) {
+ check_type_arguments (ma);
+ }
+
if (ma.inner != null && ma.inner.value_type is EnumValueType && ((EnumValueType) ma.inner.value_type).get_to_string_method() == m) {
// Enum.VALUE.to_string()
var en = (Enum) ma.inner.value_type.data_type;
methods/bug743877.vala \
methods/bug771964.vala \
methods/bug774060.vala \
+ methods/bug775466.test \
methods/generics.vala \
methods/printf-invalid.test \
methods/printf-constructor.vala \
--- /dev/null
+Invalid Code
+
+void foo<T> (T a) {
+}
+
+void main () {
+ Value v = Value (typeof (int));
+ foo (v);
+}