ref: 49d55e7425056ea5704fffe9f19f76c659079348
parent: c42fbb600b463eb1c8471bfd34ad829aad5499c3
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Feb 4 06:54:13 EST 2016
Find the first type that has a base type. This will work correctly for specializations of slices and typedefs thereof.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -882,8 +882,11 @@
{
Type *t;
- a = tysearch(a);
t = htget(st->seqbase, a);
+ while (!t && a->type == Tyname) {
+ a = a->sub[0];
+ t = htget(st->seqbase, a);
+ }
if (!t && (a->type == Tyslice || a->type == Tyarray || a->type == Typtr))
t = a->sub[0];
if (t)