You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I met compilation error (error CS1061: Type `haxe.IMap<object,int>' does not contain a definition for `keys' and no extension method `keys' of type `haxe.IMap<object,int>' could be found. Are you missing an assembly reference?) when try to compile next code:
This can be workarounded one of next ways:
Removing inline from EquatableMap#tryGetKey
Adding --macro keep("haxe.Constraints.IMap") in build.hxml
-cs output/
-cp .
-main Main
-dce full
-debug
-D real-position
-cmd mono output/bin/Main-Debug.exe
Console output
$ haxe build.hxml
haxelib run hxcs hxcs_build.txt --haxe-version 3402 --feature-level 1
Note: dmcs is deprecated, please use mcs instead!
src/Main.cs(145,24): error CS1061: Type `haxe.IMap<object,int>' does not contain a definition for `keys' and no extension method `keys' of type `haxe.IMap<object,int>' could be found. Are you missing an assembly reference?
src/haxe/Constraints.cs(5,19): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
Compilation error
Native compilation failed
Error: Build failed
The text was updated successfully, but these errors were encountered:
$ haxe build.hxml
haxelib run hxcs hxcs_build.txt --haxe-version 3402 --feature-level 1
Note: dmcs is deprecated, please use mcs instead!
src/Main.cs(133,9): error CS1061: Type `IInterface' does not contain a definition for `interfaceMethod2' and no extension method `interfaceMethod2' of type `IInterface' could be found. Are you missing an assembly reference?
src/Main.cs(4,18): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
Compilation error
Native compilation failed
Error: Build failed
romanmikhailov
changed the title
DCE seems to strip interfaces fields when using theirs in abstract inline functions
[cs] DCE seems to strip interfaces fields when using theirs in abstract inline functions
Aug 1, 2017
I also encountered this when doing my Reflaxe/Dart target (although tbf it could be me implementing it wrong) having to add @:keep to IMap to stop it from DCEing the fields.
I met compilation error (
error CS1061: Type `haxe.IMap<object,int>' does not contain a definition for `keys' and no extension method `keys' of type `haxe.IMap<object,int>' could be found. Are you missing an assembly reference?
) when try to compile next code:This can be workarounded one of next ways:
inline
fromEquatableMap#tryGetKey
--macro keep("haxe.Constraints.IMap")
inbuild.hxml
Main#fooMap
tomain
Main.hx
build.hxml
Console output
The text was updated successfully, but these errors were encountered: