summaryrefslogtreecommitdiff
path: root/parse/type.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-31 22:18:17 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-31 22:49:31 -0800
commit128470e404d843b3d71c5837cac05d4d4203bd66 (patch)
tree267d7879867aebd35a7f8203d0ff9f77fb9238f0 /parse/type.c
parentfb8753c942a8d06926977d221d5c89c3a867fa29 (diff)
downloadmc-128470e404d843b3d71c5837cac05d4d4203bd66.tar.gz
Add support for generic impls.
You can now implement generic shit like iterators.
Diffstat (limited to 'parse/type.c')
-rw-r--r--parse/type.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/type.c b/parse/type.c
index d711b6b..f6cd127 100644
--- a/parse/type.c
+++ b/parse/type.c
@@ -856,7 +856,7 @@ void iterableinit(Stab *st, Trait *tr)
func = mkdecl(Zloc, mkname(Zloc, "__iternext__"), ty);
func->decl.trait = tr;
- func->decl.impls = mkht(tyhash, tyeq);
+ func->decl.__impls = mkht(tyhash, tyeq);
func->decl.isgeneric = 1;
func->decl.isconst = 1;
func->decl.isglobl = 1;
@@ -876,7 +876,7 @@ void iterableinit(Stab *st, Trait *tr)
func = mkdecl(Zloc, mkname(Zloc, "__iterfin__"), ty);
func->decl.trait = tr;
- func->decl.impls = mkht(tyhash, tyeq);
+ func->decl.__impls = mkht(tyhash, tyeq);
func->decl.isgeneric = 1;
func->decl.isconst = 1;
func->decl.isglobl = 1;