-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-documentationPrefer using 'type-documentation' and a specific area label.Prefer using 'type-documentation' and a specific area label.library-ffitype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
TODO
- The dartdoc comment of
.address
should mention or show an example of using.cast()
. - The published
ADDRESS_POSITION
documentation should mention.cast()
.
Original bug report:
While trying to fix this,
I found the below code is
@Native<Void Function(Pointer<Void>)>(isLeaf: true)
external void myNative(Pointer<Void> buff);
void main() {
final buff = Int8List.fromList([2]);
myNative(buff.address.cc);
}
throws 2 errors by the analyzer
1. ERROR|COMPILE_TIME_ERROR|ADDRESS_POSITION|9|17|7|The '.address' expression can only be used as argument to a leaf native external call.
2. ERROR|COMPILE_TIME_ERROR|UNDEFINED_GETTER|9|25|2|The getter 'cc' isn't defined for the type 'Pointer<Int8>'.
But expected is only one error
1. ERROR|COMPILE_TIME_ERROR|UNDEFINED_GETTER|9|25|2|The getter 'cc' isn't defined for the type 'Pointer<Int8>'.
FYI @dcharkes
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-documentationPrefer using 'type-documentation' and a specific area label.Prefer using 'type-documentation' and a specific area label.library-ffitype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)