# New Ticket Created by  Zefram 
# Please include the string:  [perl #129014]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129014 >


The Range class allows most values to be used as endpoints, even things
such as type objects.  But certain type objects get mistaken for defined
objects, causing silly error results:

> Range.new(List, Pair).perl
List..Pair
> Range.new(Seq, List).perl
Seq objects are not valid endpoints for Ranges
  in block <unit> at <unknown file> line 1
> Range.new(List, Int).perl
List..Int
> Range.new(Int, List).perl
Use of uninitialized value of type List in numeric context  in block <unit> at 
<unknown file> line 1
Use of uninitialized value of type List in numeric context  in block <unit> at 
<unknown file> line 1
Invocant requires an instance of type Int, but a type object was passed.  Did 
you forget a .new?
  in block <unit> at <unknown file> line 1

These type objects should be either successfully allowed or cleanly
prohibited.  They don't have the disadvantages that the corresponding
defined objects would have, so they should probably be allowed.

-zefram

Reply via email to