We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0168c43 + f388c8a commit 6949799Copy full SHA for 6949799
spec/expression.dd
@@ -3269,9 +3269,16 @@ static assert(!is(immutable int == const));
3269
)
3270
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
3271
---
3272
+Object o;
3273
+static assert(!is(o == class)); // `o` is not a type
3274
static assert(is(Object == class));
3275
static assert(is(ModuleInfo == struct));
3276
static assert(!is(int == class));
3277
+
3278
+void f();
3279
+static assert(!is(f == function)); // `f` is not a type
3280
+static assert(is(typeof(f) == function));
3281
+static assert(!is(typeof(&f) == function)); // function pointer is not a function
3282
3283
3284
$(P The `module` and `package` forms are satisfied when *Type* is a symbol, not a *type*,
0 commit comments