Empty string literal has the wrong type

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

Bug Description

The empty string literal, like all string literals, should have type Array(Int). However, it has the generic type Array(a), like the empty array literal.

Observed behaviour:
?> :t ""
[] :: Array(t_1)

Expected behaviour:
?> :t ""
[] :: Array(Int)

This allows certain programs which should be rejected (such as array_concat("", [[]])) to be accepted.

Tags: types

Related branches

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

Fixed in r904.

Changed in mars:
status: Triaged → 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.