Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IKVMC - internal compiler error #6

Open
rjuergen opened this issue Dec 2, 2020 · 1 comment
Open

IKVMC - internal compiler error #6

rjuergen opened this issue Dec 2, 2020 · 1 comment

Comments

@rjuergen
Copy link

rjuergen commented Dec 2, 2020

I get an internal compiler error during converting an jar to an dll:

PS C:\SMARD\IKVM> .\ikvm_8.6.5.1_bin_windows\ikvmc.exe .\example-1.0-SNAPSHOT.jar
IKVM.NET Compiler version 8.6.5.1
Copyright (C) 2020 Jessie Lesbian (based on work by Jeroen Frijters and Windward Studios)
http://www.ikvm.net/

note IKVMC0002: Output file is "example-1.0-SNAPSHOT.dll"

*** INTERNAL COMPILER ERROR ***

PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE

ikvmc, Version=8.6.5.1, Culture=neutral, PublicKeyToken=null
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
4.0.30319.42000 64-bit

System.InvalidOperationException: Der Vorgang ist aufgrund des aktuellen Zustands des Objekts ungültig.
   bei IKVM.Internal.Boxer.EmitBox(CodeEmitter ilgen, TypeWrapper tw)
   bei IKVM.Internal.LambdaMetafactory.EmitDispatch(FinishContext context, TypeWrapper[] args, TypeBuilder tb, MethodWrapper interfaceMethod, TypeWrapper[] implParameters, ConstantPoolItemMethodHandle implMethod, ConstantPoolItemMethodType instantiatedMethodType, FieldBuilder[] capturedFields)
   bei IKVM.Internal.LambdaMetafactory.CreateConstructorAndDispatch(FinishContext context, ConstantPoolItemInvokeDynamic cpi, TypeBuilder tb, List`1 methods, TypeWrapper[] implParameters, ConstantPoolItemMethodType samMethodType, ConstantPoolItemMethodHandle implMethod, ConstantPoolItemMethodType instantiatedMethodType, Boolean serializable)
   bei IKVM.Internal.LambdaMetafactory.EmitImpl(FinishContext context, ClassFile classFile, ConstantPoolItemInvokeDynamic cpi, BootstrapMethod bsm, CodeEmitter ilgen)
   bei IKVM.Internal.LambdaMetafactory.Emit(FinishContext context, ClassFile classFile, Int32 constantPoolIndex, ConstantPoolItemInvokeDynamic cpi, CodeEmitter ilgen)
   bei Compiler.Compile(Block block, Int32 startIndex)
   bei Compiler.Compile(FinishContext context, TypeWrapper host, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, Method m, CodeEmitter ilGenerator, Boolean& nonleaf)
   bei IKVM.Internal.DynamicTypeWrapper.FinishContext.FinishImpl()
   bei IKVM.Internal.DynamicTypeWrapper.JavaTypeImpl.FinishCore()
   bei IKVM.Internal.DynamicTypeWrapper.JavaTypeImpl.Finish()
   bei IKVM.Internal.AotTypeWrapper.Finish()
   bei IKVM.Internal.DynamicClassLoader.FinishAll()
   bei IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly, List`1 optionsList)
   bei IkvmcCompiler.Compile(String[] args)
   bei IkvmcCompiler.Main(String[] args)

Reproducible with following code:

import java.util.Map;
import java.util.function.Supplier;

public interface LayerA {

    int getOuter();

    default Map<Object, Supplier<Object>> createQuery(Map<Object, Supplier<Object>> builder) {
        builder.put("B", getOuter() > -1 ? this::getOuter : () -> null);
        return builder;
    }

}

Or the simple example project:
example.zip

Please help me :)

@jessiepathfinder
Copy link
Owner

Thisn bug is also bothering me. I will fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants