-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added test cases for annotations, #53
- Loading branch information
Showing
14 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
val y = /\(x, x) => x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: 'x' cannot be redefined in the current scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,32 @@ | ||
val x : num = 10; | ||
val y : bool = true; | ||
val s : string = "hello"; | ||
val a = 5; | ||
|
||
val z : num = x + 10; | ||
print(z); | ||
val b = "hello world" ^ "!"; | ||
|
||
val c? = true && !false; | ||
|
||
val d = (-); | ||
|
||
val fun = /\(x, y) => { | ||
x % y == 0; | ||
}; | ||
|
||
val xs1 = ["1","2","3","4","5","6","7"]; | ||
|
||
val xs2 = [[1,2,3],[4,5,6],[7,8,9],[10]]; | ||
|
||
val map1 = { | ||
1: "One", | ||
2: "Two", | ||
3: "Three" | ||
}; | ||
|
||
val map2 = { | ||
1: { | ||
1: "One One", | ||
2: "One Two" | ||
}, | ||
2: { | ||
1: "Two One", | ||
2: "Two Two" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
20 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
val fun: (A, B) -> C = /\(x, y) => { | ||
x % y == 0; | ||
}; | ||
|
||
val fun2: A = /\(x, y) => { | ||
x % y == 0; | ||
}; | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
val xs2: list list A = [[1,2,3],[4,5,6],[7,8,9],[10]]; | ||
|
||
val xs1: A = [[1,2,3],[4,5,6],[7,8,9],[10]]; | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
val map1: A = { | ||
1: { | ||
1: "One One", | ||
2: "One Two" | ||
}, | ||
2: { | ||
1: "Two One", | ||
2: "Two Two" | ||
} | ||
}; | ||
|
||
val map2: <A: B> = { | ||
1: { | ||
1: "One One", | ||
2: "One Two" | ||
}, | ||
2: { | ||
1: "Two One", | ||
2: "Two Two" | ||
} | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
val fun: (num, A) -> B = /\(x:num, y): bool => { | ||
x % y == 0; | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
val map2: <num: A> = { | ||
1: { | ||
1: "One One", | ||
2: "One Two" | ||
}, | ||
2: { | ||
1: "Two One", | ||
2: "Two Two" | ||
} | ||
}; |
Empty file.