V: fmt: breaks typedef of functions

Created on 2 Aug 2020  路  3Comments  路  Source: vlang/v

V version:
V 0.1.28 8dcc3cd

OS:
Ubuntu 18.04
What did you do?

pub type SocketMessageFn = fn (mut c Client, msg &Message)?

run the fmt

What did you expect to see?
A well formatted code.

What did you see instead?

pub type SocketMessageFn = fn (cmut  Client, msg &Message)
Bug

Most helpful comment

Fixed in cd9bb51

All 3 comments

V 0.1.28 f9d241a
still broken for me in latest V
@Delta456

pub type SocketMessageFn = fn (mut c Client, msg &Message)?->pub type SocketMessageFn = fn (cmut Client, msg &Message) ?

it needs to not mut c => cmut too; the PR fixed only the eating of ? at the end.

Fixed in cd9bb51

Was this page helpful?
0 / 5 - 0 ratings

Related issues

penguindark picture penguindark  路  3Comments

radare picture radare  路  3Comments

choleraehyq picture choleraehyq  路  3Comments

jtkirkpatrick picture jtkirkpatrick  路  3Comments

shouji-kazuo picture shouji-kazuo  路  3Comments