Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Compute role_typecheck_list a bit earlier; add S14-roles/composition.t

  • Loading branch information...
commit 4446002c853a40342a44176633cbccecf5c8d9d7 1 parent 918bb3d
@sorear authored
Showing with 7 additions and 2 deletions.
  1. +3 −2 lib/Kernel.cs
  2. +3 −0  lib/ObjModel.cs
  3. +1 −0  t/spectest.data
View
5 lib/Kernel.cs
@@ -5463,8 +5463,9 @@ internal class MMDCandidate : MultiCandidate {
into.mo.local_attr.Add(ai);
foreach (STable su in role.mo.superclasses)
into.mo.superclasses.Add(su);
- foreach (STable su in role.mo.role_typecheck_list)
- into.mo.role_typecheck_list.Add(su);
+ // This is handled earlier, at parametric role compose time
+ //foreach (STable su in role.mo.role_typecheck_list)
+ // into.mo.role_typecheck_list.Add(su);
}
static string MethodSlot(Prod<int,string> arg) {
View
3  lib/ObjModel.cs
@@ -611,6 +611,9 @@ public class DispatchSet {
if (type == ROLE || type == PARAMETRIZED_ROLE || type == CURRIED_ROLE) {
role_typecheck_list.Add(stable);
+ foreach (STable s2 in local_roles)
+ foreach (STable s3 in s2.mo.role_typecheck_list)
+ role_typecheck_list.Add(s3);
SetMRO(Kernel.AnyMO.mo.mro);
Revalidate();
stable.SetupVTables();
View
1  t/spectest.data
@@ -344,6 +344,7 @@ S12-methods/what.t
S13-overloading/metaoperators.t
S13-type-casting/methods.t
S14-roles/attributes.t
+S14-roles/composition.t
S14-roles/lexical.t
S16-filehandles/filetest.t
S16-filehandles/io.t
Please sign in to comment.
Something went wrong with that request. Please try again.