Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Fix analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Sep 18, 2023
1 parent 52b8813 commit 7ad2c44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/src/code_generator/func_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class NativeFunc extends Type {
final Type _type;

NativeFunc(this._type) {
assert(type is FunctionType);
assert(_type is FunctionType || _type is Typealias);
}

FunctionType get type {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/code_generator/typealias.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Typealias extends BindingType {
required this.type,
bool useDartType = false,
bool isInternal = false,
}) : _useDartType = useDartType,
}) : _useDartType = useDartType,
super(
usr: usr,
name: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ final class Struct2 extends ffi.Struct {
external VoidFuncPointer constFuncPointer;
}

typedef VoidFuncPointer =
ffi.Pointer<ffi.NativeFunction<VoidFuncPointer_function>>;
typedef VoidFuncPointer
= ffi.Pointer<ffi.NativeFunction<VoidFuncPointer_function>>;
typedef VoidFuncPointer_function = ffi.Void Function();
12 changes: 6 additions & 6 deletions test/large_integration_tests/_expected_libclang_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7430,8 +7430,8 @@ abstract class CXChildVisitResult {
}

/// Visitor invoked for each cursor found by a traversal.
typedef CXCursorVisitor =
ffi.Pointer<ffi.NativeFunction<CXCursorVisitor_function>>;
typedef CXCursorVisitor
= ffi.Pointer<ffi.NativeFunction<CXCursorVisitor_function>>;
typedef CXCursorVisitor_function = ffi.Int32 Function(
CXCursor cursor, CXCursor parent, CXClientData client_data);

Expand Down Expand Up @@ -7761,8 +7761,8 @@ abstract class CXCompletionContext {

/// Visitor invoked for each file in a translation unit (used with
/// clang_getInclusions()).
typedef CXInclusionVisitor =
ffi.Pointer<ffi.NativeFunction<CXInclusionVisitor_function>>;
typedef CXInclusionVisitor
= ffi.Pointer<ffi.NativeFunction<CXInclusionVisitor_function>>;
typedef CXInclusionVisitor_function = ffi.Void Function(
CXFile included_file,
ffi.Pointer<CXSourceLocation> inclusion_stack,
Expand Down Expand Up @@ -8224,8 +8224,8 @@ abstract class CXIndexOptFlags {
}

/// Visitor invoked for each field found by a traversal.
typedef CXFieldVisitor =
ffi.Pointer<ffi.NativeFunction<CXFieldVisitor_function>>;
typedef CXFieldVisitor
= ffi.Pointer<ffi.NativeFunction<CXFieldVisitor_function>>;
typedef CXFieldVisitor_function = ffi.Int32 Function(
CXCursor C, CXClientData client_data);

Expand Down

0 comments on commit 7ad2c44

Please sign in to comment.