Skip to content

Commit 2b9198f

Browse files
Remove dead code containing error. (#825)
2 parents ad56834 + 9b666b0 commit 2b9198f

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

skiplang/prelude/src/skstore/File.sk

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,6 @@ extension base class .Inspect {
158158
class VoidFile() extends File
159159

160160
class IntFile(value: Int) extends File uses Orderable, Show {
161-
fun +<T: Integral>(x: T): IntFile {
162-
!this.value = this.value + x;
163-
this
164-
}
165-
fun -<T: Integral>(x: T): IntFile {
166-
!this.value = this.value + x;
167-
this
168-
}
169161
fun toString(): String {
170162
this.value.toString()
171163
}

skiplang/prelude/tests/skfs/StressTest.sk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ fun updateProgram(
591591
i: Int,
592592
): Program {
593593
!prog.diffs = prog.diffs.map((_, diff) ->
594-
diff.map((_, arr) -> arr.map(x -> x + i))
594+
diff.map((_, arr) -> arr.map(x -> SKStore.IntFile(x.value + i)))
595595
);
596596
!prog.inputs = prog.inputs.map(input -> {
597597
dirName = SKStore.DirName::create(input.name);

skiplang/prelude/tests/skfs/TestSubDir.sk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ fun testSubSubDirUnit(): void {
142142
SKStore.IntFile::type,
143143
context,
144144
SKStore.DirName::create("/subDir2/"),
145-
(_context, writer, key, values) ~> writer.set(key, values.first + 1),
145+
(_context, writer, key, values) ~>
146+
writer.set(key, SKStore.IntFile(values.first.value + 1))
147+
,
146148
);
147149
_ = dir1.map(
148150
SKStore.IID::keyType,

0 commit comments

Comments
 (0)