Interactive: Type variables not bound sometimes
Bug #418161 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Released
|
High
|
Matt Giuca |
Bug Description
When assigning to a variable, type variables which aren't known at the time of assignment are left unbound. This only affects interactive mode.
Observed behaviour:
?> a = [1,2,3]
?> :t a
a :: Array(t_1)
?> x = array_ref(a, 0)
?> x
1
?> :t x
x :: t_1
Expected behaviour:
?> a = [1,2,3]
?> :t a
a :: Array(Int)
?> x = array_ref(a, 0)
?> x
1
?> :t x
x :: Int
This doesn't seem to cause any invalid type errors. e.g. The variable x is still usable where an Int is required. So this may just be a display issue.
Related branches
Changed in mars: | |
assignee: | nobody → Matt Giuca (mgiuca) |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: types |
Changed in mars: | |
milestone: | none → 0.3 |
Changed in mars: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
From TODO note in the repository:
"Need to store a varset with each variable in interactive mode. Otherwise, type variables lose their names and, critically, their bindings."
This is probably sufficient to fix this bug.