#2464 Retyping functions

SlimerDude Wed 16 Sep 2015

When I try to retype a function to a nullable type, I get ArgErr: Not a Func type - is this correct? Example:


sys::ArgErr: Not a Func type: |->sys::Void|?
  fan.sys.Func.retype (Func.java:300)

It's an edge case, and I can see why the nullable aspect is nothing to do with the function parameters - however, is there any why it can't be cast to a nullable function?

brian Wed 16 Sep 2015

I think for that one, that is the correct behavior since the parameter really should be a proper non-nullable function type. If you had some type variable, you could always just call toNonNullable on it (but don't think that function should do it for you automatically)

Login or Signup to reply.