Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UnrelatedClass abstract
- {
- string s;
- static UnrelatedClass Create()
- {
- UnrelatedClass instance = new();
- instance.s = "test";
- return instance;
- }
- }
- class TestInventory : Inventory
- {
- override bool DrawPowerup(int x, int y)
- {
- UnrelatedClass cls2 = UnrelatedClass.Create(); // should work
- Console.Printf("created cls2, cls2.s = %s", cls2.s);
- UnrelatedClass cls = new('UnrelatedClass'); // should fail
- Console.Printf("created cls"); // shouldn't get to this point
- textureID tx = TexMan.CheckForTexture("M_DOOM", TexMan.TYPE_Any); // should work
- Screen.DrawHUDTexture(tx, 0, 0); // should work
- return true;
- }
- }
- struct LelStruct
- {
- void MakeUnrelatedClass()
- {
- new(); // this should fail horribly
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement