E4229

E4229#

#alias is not supported on declare fn or declare let declarations. These declarations describe an interface without providing its implementation.

Erroneous example#

///|
#alias(old_name)
declare pub fn new_name() -> Int32

///|
pub fn new_name() -> Int32 {
  42
}

Suggestion#

Move #alias to the corresponding function or value definition. If the alias is part of a declaration-based interface, declare its name separately. The declarations check the signatures, not whether one name is implemented as an alias of the other.

///|
declare pub fn new_name() -> Int32

///|
declare pub fn old_name() -> Int32

///|
#alias(old_name)
pub fn new_name() -> Int32 {
  42
}