E4015

E4015#

Type has no method with the specified name.

Erroneous Example#

///|
pub fn shout() -> String {
  "hey".upper()
}

The above example tries to call an inexistent method upper() on a string literal, giving the following error on line 1:

Type String has no method upper.

Suggestion#

This is usually a typo or a misunderstanding of the methods available. Please make sure to use the correct method name:

///|
pub fn shout() -> String {
  "hey".to_upper()
}