You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing trait causes fatal error unlike a missing interface or parent class #17959
Fatal error: Trait "MissingTrait" not found in /in/QPqKX on line 3
Process exited with code 255.
But I expected this output instead:
Fatal error: Uncaught Error: Trait "MissingTrait" not found in /in/QPqKX on line 3
Stack trace:
#0 {main}
thrown in /in/bSnmM on line 3
Process exited with code 255.
Fatal error: Uncaught Error: Class "Missing" not found in /in/bSnmM:3
Stack trace:
#0 {main}
thrown in /in/bSnmM on line 3
Process exited with code 255.
Fatal error: Uncaught Error: Interface "MissingInterface" not found in /in/UV6mc:3
Stack trace:
#0 {main}
thrown in /in/UV6mc on line 3
Process exited with code 255.
I would call this a feature rather than a bug. Recovering from inheritance errors can lead to subtle issues. It should almost certainly be fine here since this error occurs before the interface one, but this should still land in master and not in active branches.
Activity
alexpott commentedon Mar 3, 2025
Compare with the behaviour for a missing class.
produces:
alexpott commentedon Mar 3, 2025
Or interface
produces:
iluuu1994 commentedon Mar 3, 2025
I would call this a feature rather than a bug. Recovering from inheritance errors can lead to subtle issues. It should almost certainly be fine here since this error occurs before the interface one, but this should still land in master and not in active branches.
Make missing trait error recoverable
alexpott commentedon Mar 5, 2025
@iluuu1994 thanks! Your fix looks great!
iluuu1994 commentedon Mar 12, 2025
Thanks for the report! Should be fixed in master.
Make missing trait error recoverable