Skip to content

Commit

Permalink
rm sugar from t70
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jan 31, 2024
1 parent be64732 commit be74745
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
20 changes: 0 additions & 20 deletions tests/t70_locals.nim
Original file line number Diff line number Diff line change
Expand Up @@ -501,23 +501,3 @@ suite "lifetimes":
# destroy bar.m; eg. step == 9

foo()

import std/sugar

suite "high-cal":
var r = 0
block:
## sugary procedure arguments can be used in expressions
r = 0
proc bar(x: int): int {.cps: Cont.} =
inc r
result = x * 2

proc foo(fn: (int) -> int): int {.cps: Cont.} =
inc r
result = fn: bar(2)
inc r

check 12 == foo(x => x * 3)
check r == 3

1 change: 0 additions & 1 deletion tests/t71_sugar.nim
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ suite "high-cal":

check 12 == foo(x => x * 3)

Check failure on line 19 in tests/t71_sugar.nim

View workflow job for this annotation

GitHub Actions / ubuntu-latest (nim devel)

type mismatch

Check failure on line 19 in tests/t71_sugar.nim

View workflow job for this annotation

GitHub Actions / ubuntu-latest (nimskull *)

type mismatch: got <untyped>

Check failure on line 19 in tests/t71_sugar.nim

View workflow job for this annotation

GitHub Actions / ubuntu-latest (nimskull *)

type mismatch: got <string, >

Check failure on line 19 in tests/t71_sugar.nim

View workflow job for this annotation

GitHub Actions / ubuntu-latest (nimskull *)

type mismatch: got <string, >
check r == 3

0 comments on commit be74745

Please sign in to comment.