parent
ff87a36951
commit
e690dc9619
|
@ -199,7 +199,10 @@ What the above code is doing is:
|
|||
The last line ocnatining an asssertion:
|
||||
|
||||
``` d
|
||||
assert(isSameType(variableDeclarationType, assignmentInstr.getInstrType())); // Sanity check
|
||||
assert(isSameType(
|
||||
variableDeclarationType,
|
||||
assignmentInstr.getInstrType()
|
||||
); // Sanity check
|
||||
```
|
||||
|
||||
This is a sanity check, as if the type coercion failed then an exception
|
||||
|
|
|
@ -281,7 +281,10 @@ What the above code is doing is:
|
|||
The last line ocnatining an asssertion:
|
||||
|
||||
```{.d .numberLines}
|
||||
assert(isSameType(variableDeclarationType, assignmentInstr.getInstrType())); // Sanity check
|
||||
assert(isSameType(
|
||||
variableDeclarationType,
|
||||
assignmentInstr.getInstrType()
|
||||
); // Sanity check
|
||||
```
|
||||
|
||||
This is a sanity check, as if the type coercion failed then an exception would be thrown and the assertion would not be reached, however if the types were an exact match **or** if they were not but could be coerced as such then the two types should match.
|
Loading…
Reference in New Issue