Lines Matching refs:pure
784 (attrs & FA.pure_ ? " pure" : "")
1491 @safe pure nothrow @nogc unittest
1592 real func(real x) pure nothrow @safe
1623 int pureF() pure { return 0; }
1670 int pure_nothrow() nothrow pure;
1689 int pure_const() const pure { return 0; }
1690 int pure_sharedconst() const shared pure { return 0; }
1723 case "pure": res |= pure_; break;
1778 real func(real x) pure nothrow @safe;
1779 static assert(hasFunctionAttributes!(func, "@safe", "pure"));
1787 static assert(hasFunctionAttributes!(myFunc!bool, "@safe", "pure", "@nogc", "nothrow"));
1810 int pureF() pure;
1820 static assert(!hasFunctionAttributes!(S.noF, "@system", "pure"));
1828 static assert(!hasFunctionAttributes!(S.immutableF, "immutable", "@system", "pure"));
1832 static assert(!hasFunctionAttributes!(S.inoutF, "inout", "@system", "pure"));
1840 static assert(!hasFunctionAttributes!(S.refF, "ref", "@system", "return", "pure"));
1866 static assert(hasFunctionAttributes!(S.pureF, "pure", "@system"));
1867 static assert(hasFunctionAttributes!(typeof(S.pureF), "pure", "@system"));
1868 static assert(!hasFunctionAttributes!(S.pureF, "pure", "@system", "ref"));
1874 int pure_nothrow() nothrow pure { return 0; }
1879 static assert(hasFunctionAttributes!(pure_nothrow, "pure", "nothrow", "@safe"));
1880 static assert(hasFunctionAttributes!(typeof(pure_nothrow), "pure", "nothrow", "@safe"));
1881 static assert(!hasFunctionAttributes!(pure_nothrow, "pure", "nothrow", "@safe", "@trusted"));
1885 static assert(hasFunctionAttributes!(safe_nothrow, "@safe", "nothrow", "pure"));
1886 static assert(!hasFunctionAttributes!(safe_nothrow, "@safe", "nothrow", "pure", "@trusted"));
1899 int pure_const() const pure { return 0; }
1900 int pure_sharedconst() const shared pure { return 0; }
1903 static assert(hasFunctionAttributes!(S2.pure_const, "const", "pure", "@system"));
1904 static assert(hasFunctionAttributes!(typeof(S2.pure_const), "const", "pure", "@system"));
1905 static assert(!hasFunctionAttributes!(S2.pure_const, "const", "pure", "@system", "ref"));
1907 static assert(hasFunctionAttributes!(S2.pure_sharedconst, "const", "shared", "pure", "@system"));
1908 static assert(hasFunctionAttributes!(typeof(S2.pure_sharedconst), "const", "shared", "pure", "@system"));
1909 static assert(!hasFunctionAttributes!(S2.pure_sharedconst, "const", "shared", "pure", "@system", "@nogc"));
1911 static assert(hasFunctionAttributes!((int a) { }, "pure", "nothrow", "@nogc", "@safe"));
1912 static assert(hasFunctionAttributes!(typeof((int a) { }), "pure", "nothrow", "@nogc", "@safe"));
1913 static assert(!hasFunctionAttributes!((int a) { }, "pure", "nothrow", "@nogc", "@safe", "ref"));
1916 static assert(hasFunctionAttributes!(safeDel, "pure", "nothrow", "@nogc", "@safe"));
1917 static assert(hasFunctionAttributes!(typeof(safeDel), "pure", "nothrow", "@nogc", "@safe"));
1918 static assert(!hasFunctionAttributes!(safeDel, "pure", "nothrow", "@nogc", "@safe", "@system"));
1921 static assert(hasFunctionAttributes!(trustedDel, "pure", "nothrow", "@nogc", "@trusted"));
1922 static assert(hasFunctionAttributes!(typeof(trustedDel), "pure", "nothrow", "@nogc", "@trusted"));
1923 static assert(!hasFunctionAttributes!(trustedDel, "pure", "nothrow", "@nogc", "@trusted", "ref"));
1926 static assert(hasFunctionAttributes!(systemDel, "pure", "nothrow", "@nogc", "@system"));
1927 static assert(hasFunctionAttributes!(typeof(systemDel), "pure", "nothrow", "@nogc", "@system"));
1928 static assert(!hasFunctionAttributes!(systemDel, "pure", "nothrow", "@nogc", "@system", "@property"));
2375 result ~= " pure";
2434 int g() pure @trusted
3986 static void f2() pure nothrow @nogc @safe;
3998 void m2() const pure nothrow @nogc @safe;
4024 static void f2() pure nothrow @nogc @safe;
4036 final void m2() const pure nothrow @nogc @safe;
5508 * - overrider can add pure and nothrow, but can't remove them
8315 static if (is(typeof({ return x; }) : int delegate() pure))
8316 static assert(mangledName!((int a) { return a+x; }) == "DFNaNbNiNfiZi"); // pure nothrow @safe @nogc