Browse Source

Add error message for non-constant polymorphic name parameters

gingerBill 6 years ago
parent
commit
5877017d30
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/check_type.cpp

+ 1 - 0
src/check_type.cpp

@@ -1622,6 +1622,7 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
 						if (op.mode == Addressing_Constant) {
 						if (op.mode == Addressing_Constant) {
 							poly_const = op.value;
 							poly_const = op.value;
 						} else {
 						} else {
+							error(op.expr, "Expected a constant value for this polymorphic name parameter");
 							success = false;
 							success = false;
 						}
 						}
 					}
 					}