aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-18 20:56:53 +0000
committergingerBill <bill@gingerbill.org>2017-11-18 20:56:53 +0000
commit0c06a8d15426c6a67c76fa8afbe9d967c46b571b (patch)
tree3b1d0166eb3e0a1f88d1669b7f094878a473e3fb /src/check_expr.cpp
parentb0e3a4e27655cff42b3645ba4be2ad3a602997b9 (diff)
Fix issue #146 regarding polymorphic type parametersv0.7.0
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 707baaaf7..4c52ca400 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -767,7 +767,9 @@ bool is_polymorphic_type_assignable(Checker *c, Type *poly, Type *source, bool c
if (check_type_specialization_to(c, poly, source, compound, modify_type)) {
return true;
}
- if (compound) return are_types_identical(poly, source);
+ if (compound || !is_type_generic(poly)) {
+ return are_types_identical(poly, source);
+ }
return check_is_assignable_to(c, &o, poly);
}