summaryrefslogtreecommitdiff
path: root/vala/valapointertype.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valapointertype.vala')
-rw-r--r--vala/valapointertype.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/vala/valapointertype.vala b/vala/valapointertype.vala
index 2a26f92cb..6efbad9bd 100644
--- a/vala/valapointertype.vala
+++ b/vala/valapointertype.vala
@@ -113,6 +113,19 @@ public class Vala.PointerType : DataType {
base_type.accept (visitor);
}
+ public override bool stricter (DataType type2) {
+ if (type2 is PointerType) {
+ return compatible (type2);
+ }
+
+ if (base_type is VoidType) {
+ // void* can hold reference types
+ return type2 is ReferenceType;
+ }
+
+ return base_type.stricter (type2);
+ }
+
public override void replace_type (DataType old_type, DataType new_type) {
if (base_type == old_type) {
base_type = new_type;