WurstScript icon indicating copy to clipboard operation
WurstScript copied to clipboard

strings do not cast to int correctly in compiletime with -lua option

Open rhazarian opened this issue 5 years ago • 0 comments

The following example does not work.

package Test

import HashMap

let map = compiletime(new HashMap<string, string>())

@compiletime function initialize()
    map.put("hello", "world")

Error in File Hashtable.wurst line 11: You encountered a bug in the interpreter: java.lang.Error: The native <HaveSavedInteger> expects different parameter 2! Expected: ILconstInt Actual: "hello" at C:\Users\Rhaza\OneDrive\PC-3\Documents\SotFRP_build\dependencies\WurstStdlib2\wurst_handles\Hashtable.wurst line 11 Error in File Test.wurst line 7: ... when calling initialize() in Test.wurst:7 Error in File Test.wurst line 8: ... when calling HashMap_put(HashMap402_86, "hello", "world") in Test.wurst:8 Error in File HashMap.wurst line 18: ... when calling HashMap_has(HashMap402_86, "hello") in HashMap.wurst:18 Error in File HashMap.wurst line 14: ... when calling Table_hasInt(HashMap402_86, "hello") in HashMap.wurst:14 Error in File Table.wurst line 11: ... when calling hashtable_hasInt(ht35, 86, "hello") in Table.wurst:11

rhazarian avatar Jan 08 '20 02:01 rhazarian