Skip to content

Commit

Permalink
Do not use getter for field of type CArray
Browse files Browse the repository at this point in the history
  • Loading branch information
kornilova203 committed Jul 2, 2018
1 parent 28cfe22 commit d7f7bad
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ object StructTests extends TestSuite {

val structWithAnonymousStruct = struct_structWithAnonymousStruct()
val array: Ptr[CArray[Byte, Nat._8]] = anonymousStruct.cast[Ptr[CArray[Byte, Nat._8]]]
!structWithAnonymousStruct._2 = !array // works
// structWithAnonymousStruct.anonymousStruct_=(!array) // fixme: fails
// val s = structWithAnonymousStruct.anonymousStruct // fixme: fails
!structWithAnonymousStruct._2 = !array

assert('a' == Struct.getCharFromAnonymousStruct(structWithAnonymousStruct))
assert(42 == Struct.getIntFromAnonymousStruct(structWithAnonymousStruct))
Expand Down

0 comments on commit d7f7bad

Please sign in to comment.