Skip to content

Commit d248fe7

Browse files
committed
Remove trailing whitespaces
1 parent 1de4ef0 commit d248fe7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/src/dmd/dcast.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ Expression implicitCastTo(Expression e, Scope* sc, Type t)
150150
//printf("type %s t %s\n", type.deco, t.deco);
151151
auto ts = toAutoQualChars(e.type, t);
152152

153-
// Special case for improved diagnostic when const to mutable conversion
153+
// Special case for improved diagnostic when const to mutable conversion
154154
// fails due to struct/union having pointers
155-
if (e.type.ty == Tstruct && t.ty == Tstruct &&
155+
if (e.type.ty == Tstruct && t.ty == Tstruct &&
156156
e.type.isTypeStruct().sym == t.isTypeStruct().sym &&
157157
e.type.mod == MODFlags.const_ && t.mod == 0)
158158
{
@@ -166,7 +166,7 @@ Expression implicitCastTo(Expression e, Scope* sc, Type t)
166166
return ErrorExp.get();
167167
}
168168
}
169-
169+
170170
error(e.loc, "cannot implicitly convert expression `%s` of type `%s` to `%s`",
171171
e.toErrMsg(), ts[0], ts[1]);
172172
}

compiler/test/fail_compilation/fix20318.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ void main() {
1010
// This should work - struct without pointers
1111
const Foo a;
1212
Foo b = a; // This is okay
13-
13+
1414
// This should fail with improved diagnostic message
1515
const Bar c;
1616
Bar d = c; // Error with improved diagnostic message
17-
17+
1818
// Test with a more complex struct with nested pointers
1919
const ComplexBar complex_c;
2020
ComplexBar complex_d = complex_c; // Give improved error message
@@ -43,4 +43,4 @@ struct ComplexBar {
4343
Simple simple; // This is fine
4444
int data; // This is fine
4545
WithPointer nested; // This field prevents implicit conversion
46-
}
46+
}

0 commit comments

Comments
 (0)