ref: fb11c9ffe92e56016771a9001cdf09b0e2295f7d
parent: 00affd843ab9b371c3a18bfa79b4d82b261911a1
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 21 16:41:55 EST 2015
Allow user traits to override subtypes.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -890,10 +890,9 @@
{
Type *t;
- if (a->type == Tyslice || a->type == Tyarray)
+ t = htget(st->seqbase, a);
+ if (!t && (a->type == Tyslice || a->type == Tyarray || a->type == Typtr))
t = a->sub[0];
- else
- t = htget(st->seqbase, a);
if (t)
t = tf(st, t);
return t;