tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

error: dynamic_cast from rvalue to reference type #79

Open masukomi opened 2 years ago

masukomi commented 2 years ago

problems compiling under macOS 12.4 with an M1 chip.

❯ make
c++ -g -O0 -c src/ByReferencePass.cpp -o obj/ByReferencePass.o -MMD -MF obj/ByReferencePass.d -MT obj/ByReferencePass.o -DSTDLIB_PATH="\"/Users/masukomi/workspace/reference/bish/lib/stdlib.bish\""
In file included from src/ByReferencePass.cpp:1:
In file included from src/ByReferencePass.h:4:
In file included from src/IR.h:10:
src/Util.h:19:10: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream<char> &')
  return dynamic_cast<std::ostringstream &>((std::ostringstream() << i )).str();
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/ByReferencePass.o] Error 1