diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-26 18:33:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 18:33:51 +0200 |
commit | 2a3a128e362929bac9c2dbf7430cbe8732840f95 (patch) | |
tree | ac794774866b8b71c5a6e271a21b42b060b57900 /tests/niminaction/Chapter2/no_def_eq.nim | |
parent | e129466910b6efa730f8d5d9232efbce6dae46f0 (diff) | |
parent | d08b9eb6731a70504be6d856723fbc94dc7bd506 (diff) | |
download | Nim-2a3a128e362929bac9c2dbf7430cbe8732840f95.tar.gz |
Merge branch 'devel' into typedesc-reforms
Diffstat (limited to 'tests/niminaction/Chapter2/no_def_eq.nim')
-rw-r--r-- | tests/niminaction/Chapter2/no_def_eq.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/niminaction/Chapter2/no_def_eq.nim b/tests/niminaction/Chapter2/no_def_eq.nim new file mode 100644 index 000000000..77f0a7dd8 --- /dev/null +++ b/tests/niminaction/Chapter2/no_def_eq.nim @@ -0,0 +1,16 @@ +discard """ + line: 16 + errormsg: "type mismatch" +""" + +type + Dog = object + name: string + + Cat = object + name: string + +let dog: Dog = Dog(name: "Fluffy") +let cat: Cat = Cat(name: "Fluffy") + +echo(dog == cat) \ No newline at end of file |