diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 233d3a7e2d..6ff3c04a17 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -122,7 +122,7 @@ pub fn (mut ctx Context) refresh_ui() { ctx.ticks = 0 } -fn gg_event_fn(ce &C.sapp_event, user_data voidptr) { +fn gg_event_fn(ce voidptr, user_data voidptr) { // e := unsafe { &sapp.Event(ce) } mut e := unsafe { &Event(ce) } mut g := unsafe { &Context(user_data) } diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index bc9c6e6126..a6b1d9d1a5 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -591,6 +591,10 @@ fn (mut p Parser) fn_receiver(mut params []ast.Param, mut rec ReceiverParsingInf } } + if rec.language != .v { + p.check_for_impure_v(rec.language, rec.type_pos) + } + params << ast.Param{ pos: rec_start_pos name: rec.name @@ -833,6 +837,10 @@ fn (mut p Parser) fn_args() ([]ast.Param, bool, bool) { } p.next() } + alanguage := p.table.get_type_symbol(arg_type).language + if alanguage != .v { + p.check_for_impure_v(alanguage, pos) + } args << ast.Param{ pos: pos name: '' @@ -918,6 +926,10 @@ fn (mut p Parser) fn_args() ([]ast.Param, bool, bool) { typ = ast.new_type(p.table.find_or_register_array(typ)).derive(typ).set_flag(.variadic) } for i, arg_name in arg_names { + alanguage := p.table.get_type_symbol(typ).language + if alanguage != .v { + p.check_for_impure_v(alanguage, type_pos[i]) + } args << ast.Param{ pos: arg_pos[i] name: arg_name