add test for ctors not tainting fields
This commit is contained in:
parent
60ccfd520e
commit
8a693954d3
|
@ -0,0 +1,3 @@
|
||||||
|
identifiers
|
||||||
|
mangleof k
|
||||||
|
member1 v
|
|
@ -0,0 +1,19 @@
|
||||||
|
struct Foo {
|
||||||
|
this(int mCtor) {}
|
||||||
|
int member1;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Bar {
|
||||||
|
this(int mCtor) {}
|
||||||
|
int member1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unittest {
|
||||||
|
Foo f;
|
||||||
|
f.m
|
||||||
|
}
|
||||||
|
|
||||||
|
unittest {
|
||||||
|
Bar b = new Bar(1);
|
||||||
|
b.m
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
../../bin/dcd-client $1 file.d -c122 > actual.txt
|
||||||
|
diff actual.txt expected.txt --strip-trailing-cr
|
||||||
|
|
||||||
|
../../bin/dcd-client $1 file.d -c162 > actual.txt
|
||||||
|
diff actual.txt expected.txt --strip-trailing-cr
|
Loading…
Reference in New Issue