mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
deprecate Object.factory
This commit is contained in:
parent
c8ae4adb2e
commit
5600cfb42f
4 changed files with 6 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
|||
// REQUIRED_ARGS: -d
|
||||
|
||||
module test34;
|
||||
|
||||
import core.exception;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRED_ARGS: -preview=rvaluerefparam
|
||||
// REQUIRED_ARGS: -d -preview=rvaluerefparam
|
||||
//
|
||||
/* TEST_OUTPUT:
|
||||
---
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
REQUIRED_ARGS: -lowmem -Jrunnable -preview=rvaluerefparam
|
||||
REQUIRED_ARGS: -d -lowmem -Jrunnable -preview=rvaluerefparam
|
||||
EXTRA_FILES: xtest46.d
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
|
|
|
@ -246,7 +246,7 @@ class Object
|
|||
* }
|
||||
* ---
|
||||
*/
|
||||
static Object factory(string classname)
|
||||
deprecated static Object factory(string classname)
|
||||
{
|
||||
auto ci = TypeInfo_Class.find(classname);
|
||||
if (ci)
|
||||
|
@ -256,7 +256,7 @@ class Object
|
|||
return null;
|
||||
}
|
||||
|
||||
@system unittest
|
||||
deprecated @system unittest
|
||||
{
|
||||
Object valid_obj = Object.factory("object.Object");
|
||||
Object invalid_obj = Object.factory("object.__this_class_doesnt_exist__");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue