"Internal error" when compiling

Monkey Forums/Monkey Bug Reports/"Internal error" when compiling

Nobuyuki(Posted 2013) [#1]
Hello,

This is a report related to the problem discussed on the following thread: http://www.monkeycoder.co.nz/Community/posts.php?topic=4931

The problem specified by trans does not point to any specific error, so I'm a bit stumped, but it occurs when compiling, and trans is produces no code. It may or may not have something to do with how Generics are used in the code.

Steps to reproduce:

1. Clone or download the source located here: https://github.com/nobuyukinyuu/monkey-timsort
2. Attempt to compile
3. ??????


marksibly(Posted 2013) [#2]
Can you please post a runnable example here?


muddy_shoes(Posted 2013) [#3]
The repo is a runnable example.


Nobuyuki(Posted 2013) [#4]
yes, the repo should have all the files you need. The entry point is located in TimSortTest.monkey. Let me know if there's any problems with any of this.

direct link to repo clone:
https://github.com/nobuyukinyuu/monkey-timsort/archive/master.zip


Here's an alternate version of TimSortTest.monkey that only uses the function call (same error occurs):




marksibly(Posted 2013) [#5]
Ok, can reproduce, but there's a lot of code there - any chance you can reduce it down a bit?


marksibly(Posted 2013) [#6]
Think I've found it - there's an issue with Select statements in generic code.

Will fix, but you can get it around it for now by using If/Else If/etc instead of Select in Method TimSort.binarySort().


Nobuyuki(Posted 2013) [#7]
Thanks a bunch. That sounds like an obscure one! Guess now it's time for me to get back and see if I can get the rest of the code working -- there were a number of small things that I seem to have missed...