"Your fullness and your tithe-offering you shall not delay (Exodus 22:28)." "Your fullness" - these are the firstfruits, which are taken from the full produce. "And your tithe-offering [dim'akha]" - this is the priestly portion [terumah]. "You shall not delay" - that you should not bring forward the second before the first, nor the first before the priestly portion, nor the priestly portion before the firstfruits. But I do not know which of them takes precedence, whether terumah before firstfruits or firstfruits before terumah. You say: Let the firstfruits come first, for they are called by four names - "beginning," "firstfruits," "offering," and "fullness" - before terumah, which is called by only three names. Let terumah, which is called by three names - "beginning," "offering," and "that which is mingled" - take precedence before the first tithe, which is called by only two names. Let the first tithe, which is called by two names - "offering" and "tithe" - take precedence before the second tithe, which is called by only one name. From here they said: Anyone who brings the terumah before the firstfruits, the first tithe before the terumah, and the second tithe before the first - even though he transgresses a negative commandment, what he has done is done [and remains valid].
Do Not Delay Your Firstfruits and the Order of the Gifts
Yalkut Shimoni on Torah 351:5
(שמות כב כח) מְלֵאָתְךָ וְדִמְעֲךָ לֹא תְאַחֵר, "מְלֵאָתְךָ", אֵלּוּ הַבִּכּוּרִים הַנִּטָּלִים מִן הַמָּלֵא. וְדִמְעֲךָ, זוֹ תְּרוּמָה, לֹא תְאַחֵר, שֶׁלֹּא תַקְדִים שֵׁנִי לָרִאשׁוֹן וְלֹא רִאשׁוֹן לִתְרוּמָה וְלֹא תְרוּמָה לְבִכּוּרִים. אֲבָל אֵינִי יוֹדֵעַ אֵיזֶה מֵהֶם קוֹדֵם, אִם תְּרוּמָה לְבִכּוּרִים אִם בִּכּוּרִים לְתרוּמָה, אָמַרְתָּ, יִקְדְּמוּ הַבִּכּוּרִים, שֶׁהֵם קְרוּיִם אַרְבָּעָה שֵׁמוֹת, רֵאשִׁית בִּכּוּרֵי תְּרוּמָה וּמְלֵאָה, לִתְרוּמָה, שֶׁאֵינָהּ קְרוּיָה אֶלָּא שָׁלֹשׁ שֵׁמוֹת. תַּקְדִים תְּרוּמָה, שֶׁהִיא קְרוּיָה שָׁלֹשׁ שֵׁמוֹת, רֵאשִׁית תְּרוּמָה וְדֶמַע, לְמַעֲשֵׂר רִאשׁוֹן, שֶׁאֵין קָרוּי אֶלָּא שְׁנֵי שֵׁמוֹת, יַקְדִּים מַעֲשֵׂר רִאשׁוֹן, שֶׁהוּא קָרוּי שְׁנֵי שֵׁמוֹת, תְּרוּמָה וּמַעֲשֵׂר, לְמַעֲשֵׂר שֵׁנִי, שֶׁאֵינוֹ קָרוּי אֶלָּא שֵׁם אֶחָד בִּלְבַד. מִכָּאן אָמְרוּ, כָּל הַמַּקְדִּים תְּרוּמָה לְבִכּוּרִים, וּמַעֲשֵׂר רִאשׁוֹן לִתְרוּמָה, וּמַעֲשֵׂר שֵׁנִי לְרִאשׁוֹן, אַף עַל פִּי שֶׁהוּא עוֹבֵר בְּלֹא תַעֲשֶׂה, מַה שֶּׁעָשָׂה עָשׂוּי.