Update tests

This commit is contained in:
Nick Treleaven 2023-11-14 18:37:11 +00:00
parent b0e4e533d1
commit 01377d9ab4
5 changed files with 12 additions and 10 deletions

View file

@ -1,18 +1,20 @@
/*
TEST_OUTPUT:
---
fail_compilation/ctor_attr.d(24): Error: none of the overloads of `this` are callable using argument types `(int)`
fail_compilation/ctor_attr.d(15): Candidates are: `ctor_attr.S.this(int x) const`
fail_compilation/ctor_attr.d(16): `ctor_attr.S.this(string x)`
fail_compilation/ctor_attr.d(26): Error: none of the overloads of `foo` are callable using a mutable object
fail_compilation/ctor_attr.d(18): Candidates are: `ctor_attr.S.foo(int x) immutable`
fail_compilation/ctor_attr.d(19): `ctor_attr.S.foo(string x)`
fail_compilation/ctor_attr.d(26): Error: none of the overloads of `this` are callable using argument types `(int)`
fail_compilation/ctor_attr.d(16): Candidates are: `ctor_attr.S.this(int x) const`
fail_compilation/ctor_attr.d(18): `ctor_attr.S.this(string x)`
fail_compilation/ctor_attr.d(17): `this()(int x) shared`
fail_compilation/ctor_attr.d(28): Error: none of the overloads of `foo` are callable using a mutable object
fail_compilation/ctor_attr.d(20): Candidates are: `ctor_attr.S.foo(int x) immutable`
fail_compilation/ctor_attr.d(21): `ctor_attr.S.foo(string x)`
---
*/
struct S
{
this(int x) const {}
this()(int x) shared {}
this(string x) {}
void foo(int x) immutable {}

View file

@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail7424d.d(10): Error: template `this.g()()` has no value
fail_compilation/fail7424d.d(10): Error: template `this.g()() immutable` has no value
---
*/
struct S7424d

View file

@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail7424e.d(10): Error: template `this.g()()` has no value
fail_compilation/fail7424e.d(10): Error: template `this.g()() immutable` has no value
---
*/
struct S7424e

View file

@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail7424f.d(10): Error: template `this.g()()` has no value
fail_compilation/fail7424f.d(10): Error: template `this.g()() shared` has no value
---
*/
struct S7424f

View file

@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail7424i.d(10): Error: template `this.g()()` has no value
fail_compilation/fail7424i.d(10): Error: template `this.g()() immutable` has no value
---
*/
struct S7424g