Seem to be a bug introduced in C1 4.0, thank you for reporting the issue.
Will be fixed soon. Possible workarounds should be:
1) Use an "external function" and define the code in either a custom dll/App_Code instead.
2) More difficult - manually add an assembly reference to the related data store (xml file/sql table) Composite_Data_Types_IInlineFunctionAssemblyReference
Will be fixed soon. Possible workarounds should be:
1) Use an "external function" and define the code in either a custom dll/App_Code instead.
2) More difficult - manually add an assembly reference to the related data store (xml file/sql table) Composite_Data_Types_IInlineFunctionAssemblyReference