keyboard input to use properly open/closed input stream

This commit is contained in:
minjaesong
2020-05-15 17:13:56 +09:00
parent e486d8dce4
commit 772354d2d1
7 changed files with 65 additions and 38 deletions

View File

@@ -84,6 +84,7 @@ class CircularArray<T>(val size: Int, val overwriteOnOverflow: Boolean): Iterabl
// even if overflowing is enabled, appending at tail causes head element to be altered, therefore such action
// must be blocked by throwing overflow error
// if you think this behaviour is wrong, you're confusing appendHead() with appendTail(). Use appendHead() and removeTail()
if (overflow) {
throw StackOverflowError()
}