首页 > 解决方案 > 芭蕾舞女演员:相同的类型是不相容的

问题描述

使用 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'

即使芭蕾舞演员无法识别我正在从同一个模块导入完全相同的东西,它不应该识别类型具有相同的签名吗?我该如何解决这个问题?

标签: ballerina

解决方案


推荐阅读