Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我编译我的源代码时,我收到以下错误:在仿函数“source/1”的参数中输入错误
编译器正确确定参数的类型,但不断尝试使用不同记录中的字段。
怎么了?
问题是正在使用的数据类型缺少“:-include_module”。即使您没有指定模块,编译器也知道类型是什么。
我通过使用更详细的语法找到了答案:
my_functor(Val1, Val2, Val3) = 变量
编译器清楚地告诉我 my_functor 没有定义。在这个特定的例子中,“源”字段在两个不同模块中的两个不同结构中命名,其中一个是导入的,这使得错误消息更加混乱。