shard-spectator/spec/spectator
Michael Miller e05ef94ef5
Initial work on stub DSL - found bug in Crystal compiler
```
Module validation failed: Invalid bitcast
  %4 = bitcast i32* %3 to %"(Spectator::Arguments(T, NT) | Nil)", !dbg !16
 (Exception)
  from /crystal/src/int.cr:541:9 in 'finish'
  from /crystal/src/compiler/crystal/codegen/codegen.cr:71:7 in 'codegen'
  from /crystal/src/compiler/crystal/compiler.cr:173:16 in 'compile'
  from /crystal/src/compiler/crystal/command/spec.cr:98:14 in 'spec'
  from /crystal/src/hash.cr:901:11 in '__crystal_main'
  from /crystal/src/crystal/main.cr:115:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
Error: you've found a bug in the Crystal compiler. ...
```

I haven't been able to reproduce this in a simplified form.

Passing the `constraint` argument in NullStub#and_return to ValueStub.new triggers the bug.
Removing the `constraint` argument fixes the issue.
2022-03-31 22:49:45 -06:00
..
dsl/mocks Initial work on stub DSL - found bug in Crystal compiler 2022-03-31 22:49:45 -06:00
mocks Remove unused objects 2022-03-30 21:11:38 -06:00
anything_spec.cr Change Anything to only use case equality 2021-02-09 21:18:20 -07:00
block_spec.cr Test value types 2021-02-09 22:50:21 -07:00
lazy_spec.cr Avoid using subject with structs 2021-02-13 17:33:52 -07:00
lazy_wrapper_spec.cr Test value types 2021-02-09 22:50:21 -07:00
value_spec.cr Use cast as workaround 2021-02-13 11:44:51 -07:00
wrapper_spec.cr Use Box for Wrapper implementation 2022-03-19 22:53:50 -06:00