summaryrefslogtreecommitdiff
path: root/tests/generics
Commit message (Collapse)AuthorAgeFilesLines
* vala: Don't make GenericType nullable by defaultRico Tzschichholz2023-04-142-0/+105
| | | | | | Allow equality between nullable and non-nullable generic-types for now Fixes https://gitlab.gnome.org/GNOME/vala/issues/1191
* codegen: Stabilize CCode.cname for backing method of lamdba expressionRico Tzschichholz2023-04-061-12/+12
| | | | Move lambda_id generation to CCodeAttribute and use _vala_lambda%d_ pattern
* codegen: Use g_object_class_override_property to implement generic interface ↵Rico Tzschichholz2023-03-132-0/+545
| | | | | | | | | | | | properties This caused the criticals like: GLib-GObject-CRITICAL **: Read/writable property 'data' on class 'Foo' has type 'gchararray' which is not exactly equal to the type 'gpointer' of the property on the interface 'IFoo' Fixes https://gitlab.gnome.org/GNOME/vala/issues/1419
* codegen: Add cast to accessor calls for generic property implementationsRico Tzschichholz2023-03-132-0/+635
| | | | Found by -Werror=int-conversion
* codegen: Cast return value of generic type accessor functionsRico Tzschichholz2023-02-051-3/+3
| | | | | | Found by -Wincompatible-function-pointer-types See https://gitlab.gnome.org/GNOME/vala/issues/1408
* codegen: Perform required casts for generic types of return-values and ↵Rico Tzschichholz2023-01-316-0/+483
| | | | | | | | in/out-parameters Found by -Werror=int-conversion Fixes https://gitlab.gnome.org/GNOME/vala/issues/1407
* tests: Update c-expectedwszqkzqk2023-01-1121-21/+21
|
* vala: Enforce required type-arguments on parameter/return types of callablesRico Tzschichholz2022-08-094-0/+37
| | | | | | This stricter check applies to delegate types in source files only. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1342
* codegen: Detect usage of static type-parameter in runtime contextRico Tzschichholz2022-05-311-0/+14
| | | | | | | Compact classes doesn't carry runtime information of its type-parameters. In case this information is required we need report an error. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1326
* codegen: Emit G_DEFINE_AUTOPTR_CLEANUP_FUNC() for interfaces with base classRico Tzschichholz2022-02-241-0/+1
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1292
* vala: Improve check of generic type references in static contextsRico Tzschichholz2022-01-304-0/+38
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1284
* tests: Generic type inference for static methods only in compact classesRico Tzschichholz2022-01-302-273/+13
|
* codegen: Use __once instead of __volatile in generated codeVal Och2022-01-0315-84/+84
| | | | | This better reflects purpose of relevant variables, especially given that they aren't volatile anymore on GLib 2.68+.
* codegen: Initialize "result" variable on declaration for abstract methods onlyRico Tzschichholz2022-01-036-8/+8
|
* codegen: Initialize type parameter properties for generics earlierRico Tzschichholz2021-12-148-7/+321
| | | | | | | If g_object_new() is used then additionally initialize type parameter properties with it. Fixes https://gitlab.gnome.org/GNOME/vala/issues/67
* tests: Add "type-parameter property clash" test to increase coverageRico Tzschichholz2021-12-142-0/+441
| | | | This needs to be handled gracefully. So throwing an error is no option.
* tests: Rename colliding test cases to avoid conflictsRico Tzschichholz2021-11-262-0/+339
|
* tests: Add missing generics/null-type.c-expectedRico Tzschichholz2021-09-291-0/+53
|
* vala: Accept NullType as generic type argumentRico Tzschichholz2021-09-271-0/+10
|
* codegen: Add type declaration for implicit temporary local variableRico Tzschichholz2021-09-181-0/+2
|
* tests: Add expected generated C sourcesRico Tzschichholz2021-07-1618-0/+5965
|
* codegen: Don't add errornous cast for unknown type_symbolRico Tzschichholz2021-05-071-2/+12
| | | | | | | | This causes invalid C code for reference transfer of GenericType. Regression of 7ae2f115a702439bd94bf09867b38019f39d010f Fixes https://gitlab.gnome.org/GNOME/vala/issues/1180
* tests: Add "generic array" test to increase coverageRico Tzschichholz2021-04-281-0/+35
|
* tests: Add "generics reference transfer" test to increase coverageRico Tzschichholz2021-04-191-0/+24
|
* codegen: Drop inner casts before converting between generics and integersRico Tzschichholz2021-03-101-0/+18
| | | | Found by -Wpointer-to-int-cast
* vala: Add missing null-check in DataType.get_type_signature()Rico Tzschichholz2021-03-071-0/+10
| | | | | | | | | If an instance struct field can not be resolved to a valid type-signature then bail. This fixes criticals like: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
* vala: Generics value holding struct pointer requires casting on accessRico Tzschichholz2021-02-191-0/+22
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/347
* vala: Check type-arguments in base-types/prerequisites of class/interfaceRico Tzschichholz2021-02-132-0/+20
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/404
* codegen: Strip all nested occurances of CCodeCastExpressionRico Tzschichholz2021-02-071-0/+14
| | | | | | Triggered by 63551acaf0d83fac8b50904c2759c1098fbfaa71 See https://gitlab.gnome.org/GNOME/vala/issues/1134
* codegen: Correctly retrieve symbol_reference of nested cast expressionsRico Tzschichholz2021-02-071-0/+9
| | | | | | Regression of 63551acaf0d83fac8b50904c2759c1098fbfaa71 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1134
* codegen: Don't use inferred type for temp-value to access generic propertyRico Tzschichholz2020-10-181-0/+12
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1088
* vala: Handle parameter initializer without value-typeRico Tzschichholz2020-07-111-0/+8
| | | | | | | | This caused criticals like: vala_data_type_compatible: assertion 'self != NULL' failed See https://gitlab.gnome.org/GNOME/vala/issues/1029
* codegen: Properly compare string if binary-expression contains string-literalRico Tzschichholz2020-07-111-0/+10
| | | | Found by -Werror=address
* vala: Transform cast from integer-type to boxed-typeRico Tzschichholz2020-05-101-0/+9
| | | | | | Don't generate faulty c-code with results in segmentation faults. Fixes https://gitlab.gnome.org/GNOME/vala/issues/992
* vala: Transform cast from floating-type to boxed-typeRico Tzschichholz2020-05-101-0/+9
| | | | | | Don't generate invalid c-code leading to "cannot convert to a pointer type" Fixes https://gitlab.gnome.org/GNOME/vala/issues/991
* test: Fix "GenericAccessors" testRico Tzschichholz2020-03-071-1/+1
|
* tests: Extend "GenericAccessors" test to increase coverageRico Tzschichholz2020-03-071-0/+4
|
* vala: Keep formal_target_type when transforming method-call/object-creationRico Tzschichholz2019-11-191-0/+20
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/835
* vala: Improve handling of "void" as generic typeRico Tzschichholz2019-11-181-0/+35
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/878
* vala: Add GenericType.dup/destroy fieldsRico Tzschichholz2019-11-041-0/+88
| | | | | | | This provides direct access to the according values of generic-types and type-parameters. Fixes https://gitlab.gnome.org/GNOME/vala/issues/190
* codegen: Make type-parameter properties readableRico Tzschichholz2019-11-041-0/+29
| | | | | | Those are immutable while being construct-only properties. See https://gitlab.gnome.org/GNOME/vala/issues/190
* vala: Improve error message for arrays as type argumentsFlorian Brosch2019-10-291-0/+8
|
* codegen: Resolve generics in sizeof-expression of parameter initializerRico Tzschichholz2019-03-221-0/+28
|
* tests: Add regression test for generic-type interference of static functionRico Tzschichholz2019-03-061-0/+9
|
* tests: Add "constructor chain up" generics test to increase coverageRico Tzschichholz2019-02-231-0/+12
|
* tests: Add "GenericAccessors" tests to increase coverageRico Tzschichholz2018-09-212-0/+27
|
* codegen: Free generic elements of glib collectionsRico Tzschichholz2018-03-213-0/+67
It needs to be possible to use parameters or fields/properties which hold dup/free functions for a generic type in scope. This required to make the destroy_func being a parameter with the benefit of being able to use g_*_free_all directly and adding a _g_node_free_all wrapper with a compatible signature. https://bugzilla.gnome.org/show_bug.cgi?id=694765