Skip to content

inlined function not getting deleted #14

@flocsy

Description

@flocsy
import Toybox.Lang;
import Toybox.WatchUi;

class OptiBug {
    var labelUnitString as String;
    var label as String;

    function initialize(measureId as Number) {
        self.labelUnitString = "foo";
        self.label = getLabel();
    }

    (:inline)
    hidden function getLabel() as String {
        var labelSuffix = self.labelUnitString;
        return (WatchUi.loadResource(Rez.Strings.AppName) as String) + labelSuffix;
    }
}

Even though getLabel() gets correctly inlined, the original method is kept (and the only place it is used is in the initialize)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions