Update README.md, add suppression

This commit is contained in:
Iaroslav 2020-06-26 16:05:13 +07:00
parent 092728b1c3
commit 2df97ca4c3
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7
2 changed files with 4 additions and 1 deletions

View File

@ -24,6 +24,7 @@ For example, the following builder:
package scientifik.kmath.asm.generated;
import java.util.Map;
import scientifik.kmath.asm.internal.MapIntrinsics;
import scientifik.kmath.expressions.Expression;
import scientifik.kmath.operations.RealField;
@ -37,9 +38,10 @@ public final class AsmCompiledExpression_1073786867_0 implements Expression<Doub
}
public final Double invoke(Map<String, ? extends Double> arguments) {
return (Double)this.algebra.add(((Double)arguments.get("x")).doubleValue(), 2.0D);
return (Double)this.algebra.add(((Double)MapIntrinsics.getOrFail(arguments, "x", (Object)null)).doubleValue(), 2.0D);
}
}
```
### Example Usage

View File

@ -3,6 +3,7 @@ package scientifik.kmath.asm.internal
import org.objectweb.asm.ClassWriter
import org.objectweb.asm.FieldVisitor
@Suppress("FunctionName")
internal inline fun ClassWriter(flags: Int, block: ClassWriter.() -> Unit): ClassWriter =
ClassWriter(flags).apply(block)