start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
23
tests/reject/tconstr1.nim
Normal file
23
tests/reject/tconstr1.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Test array, record constructors
|
||||
|
||||
type
|
||||
TComplexRecord = tuple[
|
||||
s: string,
|
||||
x, y: int,
|
||||
z: float,
|
||||
chars: set[Char]]
|
||||
|
||||
proc testSem =
|
||||
var
|
||||
things: array [0..1, TComplexRecord] = [
|
||||
(s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
|
||||
(s: "hi", x: 69, y: 45, z: 1.0, chars: {'a', 'b', 'c'})]
|
||||
write(stdout, things[0].x)
|
||||
|
||||
const
|
||||
things: array [0..1, TComplexRecord] = [
|
||||
(s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
|
||||
(s: "hi", x: 69, y: 45, z: 1.0)] #ERROR
|
||||
otherThings = [ # the same
|
||||
(s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
|
||||
(s: "hi", x: 69, y: 45, z: 1.0, chars: {'a'})]
|
||||
Loading…
Add table
Add a link
Reference in a new issue