소스 검색

[std] Make `haxe.io.Input` and `haxe.io.Output` abstract classes (#12346)

Methods `readByte():Int` and `writeByte(Int):Void` are left as-is, because marking them as abstract would break compatibility with existing subclasses that use the `override` modifier.
Frixuu 1 개월 전
부모
커밋
90a2a3c7ed
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      std/haxe/io/Input.hx
  2. 1 1
      std/haxe/io/Output.hx

+ 1 - 1
std/haxe/io/Input.hx

@@ -29,7 +29,7 @@ package haxe.io;
 	All functions which read data throw `Eof` when the end of the stream
 	All functions which read data throw `Eof` when the end of the stream
 	is reached.
 	is reached.
 **/
 **/
-class Input {
+abstract class Input {
 	/**
 	/**
 		Endianness (word byte order) used when reading numbers.
 		Endianness (word byte order) used when reading numbers.
 
 

+ 1 - 1
std/haxe/io/Output.hx

@@ -28,7 +28,7 @@ package haxe.io;
 	methods. See `File.write` and `String.write` for two ways of creating an
 	methods. See `File.write` and `String.write` for two ways of creating an
 	Output.
 	Output.
 **/
 **/
-class Output {
+abstract class Output {
 	/**
 	/**
 		Endianness (word byte order) used when writing numbers.
 		Endianness (word byte order) used when writing numbers.