|
From: Eric B. <er...@go...> - 2001-10-20 10:26:59
|
Uwe Sander wrote:
>
> Compiler is SE, the following lines are code snippets
>
> local
> stream: INPUT_STREAM
> file: KL_TEXT_INPUT_FILE
> do
> !!file.make ("test1.c")
> file.open_read
>
> stream := file
KL_TEXT_INPUT_FILE indirectly inherits from INPUT_STREAM
using implementation inheritance (export {NONE} all), therefore
even though no Eiffel compiler forbids the above assignment
it is theoritically invalid. At least that's the way I consider
it when I write Eiffel code.
> stream.read_line
Here you have a CAT-call: the entity `stream' is attached to
an instance of KL_TEXT_INPUT_FILE, and the version of
INPUT_STREAM.read_file is exported to NONE in KL_TEXT_INPUT_FILE.
Either you use the Gobo IO classes, or you use SmallEiffel's,
but don't mix and match them. This is likely not to work.
--
Eric Bezault
mailto:er...@go...
http://www.gobosoft.com
|