Skip to content

Commit

Permalink
Add a test for type checking a large buffer literal
Browse files Browse the repository at this point in the history
  • Loading branch information
kyouko-taiga committed Jul 28, 2024
1 parent 4858d06 commit adb23e9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Tests/HyloTests/TestCases/TypeChecking/LargeBufferLiteral.hylo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//- typeCheck expecting: .success

fun check<T>(_ x: T) {}

public fun main() {
let x0: Int8[100] = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
]
check<Int8[100]>(x0)
}

0 comments on commit adb23e9

Please sign in to comment.