gypsum
gypsum copied to clipboard
In compiler, Type.lub has incomplete support for trait types
After left and right are rolled up to ClassTypes, Type.lub calls findCommonBaseClass on their classes. This method is only supported on Class (at the moment), but this field is actually ObjectTypeDefn.
findCommonBaseClass should be renamed to findCommonBase, should be moved to ObjectTypeDefn, and should do a better job of finding a base trait or class.
Blocked by #30.
This problem is not well-defined, since two types may have multiple traits in common. When we have union types, Type.lub should just return a union in this case.