ref: e2f62755339d913f59d08ceafaa24849cf9da803
parent: 77a37e3330f03b9f1a9c45810994d94c921b45ae
author: Ori Bernstein <[email protected]>
date: Mon May 27 09:49:50 EDT 2013
Insert symbols into the right symbol table.
--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -8,6 +8,7 @@
optparse.myr \
rand.myr \
slappend.myr \
+ sleq.myr \
slurp.myr \
sys.myr \
types.myr \
--- a/parse/use.c
+++ b/parse/use.c
@@ -629,8 +629,8 @@
htput(tidmap, (void*)tid, t);
/* fix up types */
if (t->type == Tyname || t->type == Tygeneric)
- if (!gettype(st, t->name))
- puttype(st, t->name, t);
+ if (!gettype(s, t->name))
+ puttype(s, t->name, t);
/*
u = tybase(t);
if (u->type == Tyunion) {
--- /dev/null
+++ b/test/import-type.myr
@@ -1,0 +1,9 @@
+use std
+
+const main = {
+ var x : std.size
+ var y : std.off
+ var z : std.statbuf
+
+ -> 0
+}
--- a/test/tests
+++ b/test/tests
@@ -81,6 +81,7 @@
B catfile P Hello-世界
B encodechar P 1世界äa
B exportcycle E 0
+B import-type E 0
F declmismatch
F infermismatch
# F usedef ## BUGGERED