<commit_before>package unit.issues;
import unit.Test;

class Issue3585 extends Test {
    function test() {
        var v = inlineUnwrap();
        eq(getType(v), "Int");
    }

    static macro function getType(v:haxe.macro.Expr) {
        var t = haxe.macro.Context.typeof(v);
        return macro $v{haxe.macro.TypeTools.toString(t)};
    }

    inline function inlineUnwrap():Int {
        var tmp:Null<Int> = 1;
        return tmp;
    }
}<commit_msg>only test Null<T> to T inline unwrapping on static platform (see #3585)<commit_after>package unit.issues;
import unit.Test;

class Issue3585 extends Test {
    #if (flash || java || cs || cpp) // this is only relevant on static platforms
    function test() {
        var v = inlineUnwrap();
        eq(getType(v), "Int");
    }

    inline function inlineUnwrap():Int {
        var tmp:Null<Int> = 1;
        return tmp;
    }
    #end

    static macro function getType(v:haxe.macro.Expr) {
        var t = haxe.macro.Context.typeof(v);
        return macro $v{haxe.macro.TypeTools.toString(t)};
    }
}
{'fraction_non_alphanumeric': 0.12723845428840716, 'fraction_numerical': 0.013195098963242224, 'mean_word_length': 2.6, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2964856', 'n_tokens_mistral': 363, 'n_tokens_neox': 342, 'n_words': 90}