nitlang / nit

Nit language
http://nitlanguage.org
Apache License 2.0
239 stars 65 forks source link

Callref types #2791

Closed Louis-Vincent closed 4 years ago

Louis-Vincent commented 5 years ago

Extended the functional type hierarchy to include RoutineRef type (aka function pointer). Added type resolution on callref expression :

import functional
fun toto(x: Int) do print x
var x = &toto
assert x isa ProcRef1[Int]