Opened 9 years ago

Last modified 9 years ago

#695 new defect

FILE-POSITION support incomplete for STRING-STREAMs

Reported by: sctb Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


Consider the following interaction:

(with-input-from-string (s "1 2 3 4 5")
  (file-position s 2)
  (read s))
=> 2

(with-input-from-string (s "1 2 3 4 5")
  (file-position s :start)
  (read s))
=> 1

(with-input-from-string (s "1 2 3 4 5")
  (file-position s :end)
  (file-position s))

=> Condition: value #<STRING-INPUT-STREAM  #x3020007C0CDD> is not of the expected type FILE-STREAM.

This condition is raised in FILE-LENGTH, which is used when the keyword :END is provided. It seems as though STRING-STREAMs, since the STREAM-POSITION method is defined on them, ought to be supported by FILE-POSITION.

Change History (1)

comment:1 Changed 9 years ago by sctb

  • Type changed from enhancement to defect
Note: See TracTickets for help on using tickets.