Skip to content

Commit 11a0a59

Browse files
committed
Do not use getter for field of type CArray
1 parent 28cfe22 commit 11a0a59

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/samples/src/test/scala/org/scalanative/bindgen/samples/StructTests.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ object StructTests extends TestSuite {
2727
!anonymousStruct._2 = 42
2828

2929
val structWithAnonymousStruct = struct_structWithAnonymousStruct()
30-
val array: Ptr[CArray[Byte, Nat._8]] = anonymousStruct.cast[Ptr[CArray[Byte, Nat._8]]]
31-
!structWithAnonymousStruct._2 = !array // works
32-
// structWithAnonymousStruct.anonymousStruct_=(!array) // fixme: fails
33-
// val s = structWithAnonymousStruct.anonymousStruct // fixme: fails
30+
val array = anonymousStruct.cast[Ptr[CArray[Byte, Nat._8]]]
31+
!structWithAnonymousStruct._2 = !array
3432

3533
assert('a' == Struct.getCharFromAnonymousStruct(structWithAnonymousStruct))
3634
assert(42 == Struct.getIntFromAnonymousStruct(structWithAnonymousStruct))

0 commit comments

Comments
 (0)