Skip to content

Commit

Permalink
Fix dart enum representation (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Nov 14, 2023
1 parent 39f9b25 commit 4c8cbdb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion example/dart/lib/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 29 additions & 29 deletions feature_tests/dart/lib/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tool/src/dart/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl<'tcx> DartFormatter<'tcx> {
}

pub fn fmt_enum_as_ffi(&self, cast: bool) -> &'static str {
self.fmt_primitive_as_ffi(hir::PrimitiveType::Int(hir::IntType::U32), cast)
self.fmt_primitive_as_ffi(hir::PrimitiveType::Int(hir::IntType::I32), cast)
}

/// Get the primitive type as a Dart FFI type
Expand Down

0 comments on commit 4c8cbdb

Please sign in to comment.