E4071

E4071#

Multiple intrinsic is not supported. You have defined a function to use multiple intrinsics.

Note all intrinsic is not intended for external use and is subject to change without notice, and we highly recommend against using them.

错误示例#

type MyArray[T] Array[T]

/// @intrinsic %array.get
/// @intrinsic %fixedarray.get
fn MyArray::get[T](self : MyArray[T], index : Int) -> T { // Error: Multiple intrinsic is not unsupported.
  return self._[index]
}

建议#

Remove the extra intrinsic and use only one intrinsic:

/// @intrinsic %array.get
fn MyArray::get[T](self : MyArray[T], index : Int) -> T {
  return self._[index]
}

Avoid directly using intrinsics as much as possible, as we may change or remove them in the future. If you really need to use the intrinsic, you can check the source code of moonbitlang/core for further usage of the corresponding intrinsic.