aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorKevin Watters <kevinwatters@gmail.com>2019-03-31 12:03:22 -0400
committerKevin Watters <kevinwatters@gmail.com>2019-03-31 12:03:22 -0400
commit381fbd3dafed820583c97f176d2694b21358d178 (patch)
tree071c9b572b655ca2ca5597a7252eebe228670a02 /src/check_type.cpp
parent76a2807b56a9c0a40c66915d5b77cf537ad376f2 (diff)
parentdd9113786c4e7b18e894bd3ceee94cdf08ac6037 (diff)
Merge branch 'master' of github.com:odin-lang/Odin
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 1721ed881..22cd409ee 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1570,6 +1570,12 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
if (operands != nullptr && variables.count < operands->count) {
Operand op = (*operands)[variables.count];
+ if (op.expr == nullptr) {
+ // NOTE(bill): 2019-03-30
+ // This is just to add the error message to determine_type_from_polymorphic which
+ // depends on valid position information
+ op.expr = _params;
+ }
if (is_type_polymorphic_type) {
type = determine_type_from_polymorphic(ctx, type, op);
if (type == t_invalid) {