Skip to content

Block 返回值带 _Nonnull 修饰时的 bug #30

@yulingtianxia

Description

@yulingtianxia

返回值带 _Nonnull 的场景 case:

typedef NSObject *_Nonnull (^BarBlock)(NSObject *a);

输出的 dart 代码:

typedef NSObject _Nonnull BarBlock(NSObject a);

建议修改的位置:

// FIXME: type with _Nonnull will cause a error. Try this:
// var type = ctx.start.text
// if (type == 'void' || type == 'char') {type += ' *'}
var type = ctx.start.text + (ctx.start.start != ctx.stop.start ? ' ' + ctx.stop.text : '')

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions