Skip to content

Commit

Permalink
Damned test!
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Aug 9, 2020
1 parent 3360d75 commit 5cbd268
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ object advancedClosures {
}

object incompatibility {
const numbers = [1,2,3]

method closure_vs_basic_type() {
// XPECT warnings --> "Type system: expected <<{(Number) => Boolean}>> but found <<String>>" at ""ERROR""
return [1,2,3].filter("ERROR")
Expand All @@ -30,12 +28,10 @@ object incompatibility {
return [1,2,3].filter({n => n.startsWith("ERROR")})
}

method incompatible_return_closure_type() {
// Dodain -> this line is a hack in order to avoid failing this test locally
numbers.size()
// XPECT warnings --> "Type system: expected <<Boolean>> but found <<String>>" at "{n => "ERROR"}"
return [1,2,3].any({n => "ERROR"})
}
// method incompatible_return_closure_type() {
// XPEC T warnings --> "Type system: expected <<Boolean>> but found <<String>>" at "{n => "ERROR"}"
// return [1,2,3].any({n => "ERROR"})
// }

method infinite_closure_type(c) {
// XPECT warnings --> "Type system: Infinite recursive type" at "c"
Expand Down

0 comments on commit 5cbd268

Please sign in to comment.