atom: Constructor symbol varset is not converted to local space

Bug #877111 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Released
Critical
Matt Giuca

Bug Description

In the atom branch, the typedict module needs the type of constructor symbols, but it doesn't port the varset over to local space. That means this program crashes:

def cons(y :: a, xs :: List(a)) :: List(a):
    return Cons(y, xs)

def foo(one :: a, two :: b) :: List(b):
    return cons(two, Nil)

The call to cons passes a variable two of type b, and a variable Nil of type List(a). The problem is that they are in different namespaces: the List(a) from Nil is supposed to be converted to a List(b) in the local function. Instead, this raises a unification error ("augment_globalref: Type '(a, List(a)) -> List(a)' did not unify with '(b, List(a)) -> List(b)'.")

Tags: types

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in atom branch, r1273.

Changed in mars:
status: In Progress → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.