GRRR ...

~/felix>build/release/host/bin/flx --test=build/release --force 
test/regress/rt/type_classes-06
varray(1, 2, 3)
varray(1, 2, 3)
varray((1, 1), (2, 2), (3, 3))
42
Hello
Hello

~/felix>build/release/host/bin/flx --test=build/release --force 
--usage=prototype test/regress/rt/type_classes-06
In file included from 
/Users/johnskaller/.felix/cache/text/Users/johnskaller/felix/test/regress/rt/type_classes-06.cpp:6:
/Users/johnskaller/.felix/cache/text/Users/johnskaller/felix/test/regress/rt/type_classes-06.hpp:60:9:
 fatal error:
      unknown type name '_at40322'; did you mean '_at40312'?
typedef _at40322* _poly_39333t_40323;
        ^~~~~~~~
        _at40312
/Users/johnskaller/.felix/cache/text/Users/johnskaller/felix/test/regress/rt/type_classes-06.hpp:40:8:
 note:
      '_at40312' declared here
struct _at40312;
       ^
1 error generated.
C++ command="clang++" "-fPIC" "-g" "-c" "-fno-common" "-fno-strict-aliasing" 
"-std=c++11" "-w" "-Wfatal-errors" "-Wno-return-type-c-linkage" 
"-Wno-invalid-offsetof" "-Ibuild/release/share/lib/rtl" 
"-Ibuild/release/host/lib/rtl" "-Ilib/rtl" 
"/Users/johnskaller/.felix/cache/text/Users/johnskaller/felix/test/regress/rt/type_classes-06.cpp"
 -o 
"/Users/johnskaller/.felix/cache/text/Users/johnskaller/felix/test/regress/rt/type_classes-06.os"
 FAILED
Error 1 in flx: Operation not permitted

Just so you understand the actual error, in the C++:

//PRIMITIVE 39333 INSTANCE 40321: varray[int^2]
typedef _at40322* _poly_39333t_40323;

//TYPE 40322: int^2
// typedef _at<int,2> _at40322;
struct _at40322;

The definitions are out of order.  But in the first compile the order is 
correct:

//TYPE 40408: int^2
// typedef _at<int,2> _at40408;
struct _at40408;

//PRIMITIVE 39333 INSTANCE 40409: varray[int^2]
typedef _at40408* _poly_39333t_40409;

So this fails:

[flx] Felix command="build/release/host/bin/flxg" "-q" "--inline=5" 
"--output_dir=/Users/johnskaller/.felix/cache/text" 
"--cache_dir=/Users/johnskaller/.felix/cache/binary" "--no-reduce" 
"-Ibuild/release/host/lib" "-Ibuild/release/share/lib" 
"--syntax=@/Users/johnskaller/felix/build/release/share/lib/grammar/grammar.files"
 
"--automaton=/Users/johnskaller/.felix/cache/binary/Users/johnskaller/felix/build/release/share/lib/grammar/grammar.files/syntax.automaton"
 "--import=plat/flx.flxh" "std" 
"/Users/johnskaller/felix/test/regress/rt/type_classes-06.flx"

and the only differences are the inline of only 5 and the --no-reduce.
Normal inline is set to 25.

The way type registration works is bottom up, i.e. given some type
the types it depends on should be registered first. Since the types
are emitted in registration order this should ensure all dependent
types are emitted before the types that depend on them.

I've checked this code and it should be so :)

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to