ref: fc63cf1c9ce7e8875016acd91378da8014298e87
parent: 606f89e86ad2574ec1875cefbbcbb35dabcad6f6
author: Ori Bernstein <[email protected]>
date: Mon Feb 24 14:36:32 EST 2014
Start work towards exported traits.
--- a/parse/use.c
+++ b/parse/use.c
@@ -145,8 +145,9 @@
wrbool(fd, val->decl.isconst);
wrbool(fd, val->decl.isgeneric);
wrbool(fd, val->decl.isextern);
+ wrbool(fd, val->decl.istraitfn);
- if (val->decl.isgeneric)
+ if (val->decl.isgeneric && !val->decl.istraitfn)
pickle(val->decl.init, fd);
}
@@ -166,6 +167,7 @@
n->decl.isconst = rdbool(fd);
n->decl.isgeneric = rdbool(fd);
n->decl.isextern = rdbool(fd);
+ n->decl.istraitfn = rdbool(fd);
if (n->decl.isgeneric)
@@ -668,6 +670,8 @@
/* Usefile format:
* U<pkgname>
* T<pickled-type>
+ * R<picled-trait>
+ * I<pickled-impl>
* D<picled-decl>
* G<pickled-decl><pickled-initializer>
*/
@@ -738,6 +742,10 @@
putucon(s, t->udecls[i]);
}
break;
+ case 'R':
+ die("Traits not yet implemented");
+ case 'I':
+ die("Impls not yet implemented");
case EOF:
break;
}