Opened 11 years ago

Closed 11 years ago

#281 closed defect (fixed)

open doesn't understand (somewhat) complicated element-type's

Reported by: gz Owned by: gb
Priority: minor Milestone:
Component: ANSI CL Compliance Version:
Keywords: Cc:

Description

? (open "foo.txt" :direction :output
        :element-type '(or (integer 0 1) (integer 100 200)))
> Error: Not an ivector subtag: 182
> While executing: CCL::SUBTAG-BYTES, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > 

Change History (4)

comment:1 Changed 11 years ago by gb

  • Resolution set to duplicate
  • Status changed from new to closed

I think that this is just a duplicate of ticket:280. Somewhat-complicated element types seem to work in general, but may not be upgradeable to something that we support.

? (open "home:ccl-init.lisp" :element-type '(or (unsigned-byte 6) (unsigned-byte 7)))
#<BASIC-FILE-BINARY-INPUT-STREAM ("home:ccl-init.lisp"/4 ISO-8859-1) #x3000410E878D>
? (stream-element-type *)
(UNSIGNED-BYTE 8)

comment:2 Changed 11 years ago by gz

  • Resolution duplicate deleted
  • Status changed from closed to reopened

This type should be upgradable to (unsigned-byte 8), which we support:

? (subtypep '(or (integer 0 1) (integer 100 200))
            '(unsigned-byte 8))
T
T

It's just that the method used to figure out what to upgrade to is not good at dealing with unions.

A simpler example that fails:

(open "home:ccl-init.lisp" :element-type '(or (unsigned-byte 6) (eql -1)))

comment:3 Changed 11 years ago by gb

  • Status changed from reopened to new

claim

comment:4 Changed 11 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed as of r9061.

Note: See TracTickets for help on using tickets.