To replicate, add the following to test/thrash_test.thrift:
const SubStruct CONST_SUBSTRUCT = { "sub_id": 9, "sub_name": "number nine" }
This causes an error on compile:
$ THRIFT_INPUT_DIR=test/ mix compile.thrift
thrift -o src --gen erl test/thrash_test.thrift
$ mix test
Compiling 1 file (.erl)
Compiling 11 files (.ex)
== Compilation error on file test/simple_struct.ex ==
** (ErlangError) erlang error: {:undefined_record, :SubStruct}
(stdlib) :erl_eval.exprs/2
expanding macro: Thrash.Constants.__using__/1
test/simple_struct.ex:14: Constants (module)
(elixir) expanding macro: Kernel.use/1
test/simple_struct.ex:14: Constants (module)
To replicate, add the following to test/thrash_test.thrift:
This causes an error on compile: