ballerina - 芭蕾舞女演员:相同的类型是不相容的
问题描述
使用 ballerina 0.991.0,我的主文件中有这个:
import ballerinax/jdbc;
import myorg/mymodule;
...
jdbc:Client myDB = new({
url: "jdbc:postgresql:mydb",
// etc, db properties
});
...
result = mymodule:runQuery(myDB);
...
同时,在mymodule
:
import ballerinax/jdbc;
...
public function runQuery (jdbc:Client db) returns json {
...
尝试编译我的项目,我收到错误消息:
error: .::my_service.bal:32:27: incompatible types: expected 'ballerinax/jdbc:0.0.0:Client', found 'ballerinax/jdbc:0.0.0:Client'
即使芭蕾舞演员无法识别我正在从同一个模块导入完全相同的东西,它不应该识别类型具有相同的签名吗?我该如何解决这个问题?
解决方案
推荐阅读
- mysql - Mysql auroraDb中如何高效传递40个参数
- java - 在 Java 应用程序中使用 Matlab FIS
- c# - 获取 CLR 对象属性引发无法转换类型为“System.__ComObject”的 COM 对象
- javascript - Chrome 扩展程序在第一次安装时不起作用
- angular - Angular 6 我有 2 个导航栏和不同的路线,但我必须将一个或另一个放在同一页面中
- html - 在轮播中为 img 制作 ng-repeat
- python - vscode - 从 .py 文件所在的当前文件夹读取文件
- php - 从正则表达式中获取变量
- python-3.x - 如何在代码中实现 python 字典以完成与列表函数相同的工作
- android - 尝试将数据从活动传递到片段时,我的应用程序崩溃