The Tur and the Shulchan Aruch wrote in section 3: "A person from the market who had a house in a courtyard and died, and left his domain to one of the residents of the courtyard, if he died while it was still day—the one who acquires it does not forbid [the residents from carrying], for the eruv that he made for his own house also permits what he inherited. And if he died after it grew dark—he forbids, even though the one who acquired it made an eruv with them—it does not avail for what he inherited afterward on Shabbat." Thus far their words. The explanation of the matter is that this person from the market who had a house in this courtyard used to eat in this house, and the reason he is called 'a person from the market' is because he did not dwell there permanently, but only to eat; and according to this, when he did not make an eruv with them—he forbade them. Therefore, when he died on Shabbat, even though one of the residents of the courtyard inherited from him—nevertheless, his eruv that he gave on the eve of Shabbat does not avail for what he inherited on Shabbat. But when he died while it was still day, even though this heir had already given his portion in the eruv—nevertheless, when the time for the acquisition of the eruv arrived, this house was also included in his portion. But if this person from the market did not eat here, and did not forbid them, even if he died on Shabbat—he does not forbid, for 'since it was permitted, it remains permitted.' And the same law applies if one of the residents of the courtyard who did not make an eruv died, except that the common way of the matter is that a resident of the courtyard presumably gave his eruv, and if so, it is always permitted. This is not so for the person from the market; even though he is obligated in the eruv—nevertheless, sometimes he forgets this, since he is not frequently in the courtyard. (And this is the intention of the Magen Avraham in subsection 4 and the Taz in subsection 3).
And from this we have learned that if five dwell in one courtyard and four made an eruv and one did not make an eruv and died on Shabbat—they are permitted to carry, and we do not say that the eruv did not take effect at the onset of Shabbat because of this one who did not make an eruv, and how can it take effect in the middle of Shabbat. For it is not so, as the eruv takes effect at the onset of Shabbat, and these four become as those who dwell together, and there is only one who forbids them, and since he died, his prohibition is nullified. And the proof for this is that this one who did not make an eruv can nullify his domain to them, as will be explained in siman 380, and of what avail is the nullification of domain after the eruv did not take effect? Rather, it is certain that the eruv takes effect, as I have written.
כתבו הטור והש"ע סעיף ג': "אחד מן השוק שהיה לו בית בחצר ומת, והניח רשותו לאחד מבני החצר, אם מת מבעוד יום - אין הזוכה אוסר, שהעירוב שמערב על ביתו מתיר גם מה שירש. ואם מת משחשיכה - אוסר, אף על פי שעירב הזוכה עמהם - אינו מועיל למה שירש אחר כך בשבת" עכ"ל. ביאור הדברים, דזה האחד מן השוק שהיה לו בית בחצר זו, היה אוכל בו בבית זה, והא דקרי ליה 'אחד מן השוק' - משום דלא היה דר בה בקביעות, רק לאכול בלבד, ולפי זה, כשלא עירב עמהם - אסר עליהם. ולכן כשמת בשבת, אף על פי שאחד מבני החצר ירש אותו - מכל מקום אין עירובו שנתן בערב שבת מועיל על מה שירש בשבת. אבל כשמת מבעוד יום, אף על פי שזה היורש כבר נתן חלקו בעירוב - מכל מקום בהגיע זמן קניית העירוב נכללה גם בית זו בחלקו. אבל אם זה מן השוק לא אכל בכאן, ולא אסר עליהם, אפילו מת בשבת - אינו אוסר, ד'הואיל והותרה הותרה'. והוא הדין אם אחד מבני החצר שלא עירב מת, אלא אורחא דמילתא דבן חצר מסתמא נתן עירובו, ואם כן מותר לעולם. ולא כן בן השוק, אף על פי שמחוייב בעירוב - מכל מקום לפעמים שוכח על זה, כיון שאינו מצוי בחצר. (וזהו כונת המג"א בסק"ד ובט"ז סק"ג)ומזה למדנו, דחמשה שדרים בחצר אחד וד' עירבו ואחד לא עירב ומת בשבת - דמותרים לטלטל, ולא אמרינן הרי העירוב לא חל בכניסת השבת מפני זה שלא עירב, ואיך יחול באמצע השבת. דאינו כן, דהעירוב חל בכניסת השבת, ונעשו אלו הד' כדרים יחד, ורק יש אחד האוסר עליהם, וכיון שמת בטל איסורו. וראיה לזה, שהרי זה שלא עירב יכול לבטל להם רשותו, כמו שיתבאר בסימן ש"פ, ומה מועיל הביטול רשות אחרי שהעירוב לא חל, אלא ודאי שהעירוב חל, וכמ"ש.