Skip to content

Commit

Permalink
Fix merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Boerman committed Dec 25, 2024
2 parents ac378aa + b8434e6 commit 5d0e754
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ case object NoValue extends Maybe[scala.Nothing] {
// def serialize(): java.util.Map[String, AnyRef] = {
// val map = new java.util.HashMap[String, AnyRef]()
// map.putAll($serialize())
// map.put("$variant", "Nothing" /*or or the class name in case there was no alias*/)
// map.put("$variant", "Nothing" /*or, the class name in case there was no alias*/)
// return map;
// }
//
Expand Down
2 changes: 1 addition & 1 deletion Scala3Example/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Scala3Example
version: ${project.version}
api-version: "1.19"
api-version: "1.21"
folia-supported: true
load: STARTUP

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.bukkit.configuration.file.YamlConfiguration
import java.io.File
import xyz.janboerman.scalaloader.configurationserializable.{ConfigurationSerializable, Scan}

import java.lang.annotation.Annotation
import scala.collection.immutable.{ArraySeq, SortedSet}
import scala.collection.mutable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import xyz.janboerman.scalaloader.configurationserializable.runtime.{Codec, Runt
import xyz.janboerman.scalaloader.plugin.description.{Api, ApiVersion, Scala, ScalaVersion}
import xyz.janboerman.scalaloader.plugin.{ScalaPlugin, ScalaPluginDescription}

@Scala(ScalaVersion.v3_6_2)
@Scala(version = ScalaVersion.v3_6_2)
object ExamplePlugin extends ScalaPlugin {

override def onEnable(): Unit =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
Class<?>[] value() default {};

/**
* With what alias should the top type have?
* What alias should the top type have?
* @return the alias
*/
String as() default "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ private static void collectionToLiveType(IScalaPluginClassLoader pluginClassLoad
if ("java/util/EnumSet".equals(implementationClassName)) {
//special-case EnumSet because has no nullary constructor.
methodVisitor.visitLdcInsn(Type.getType(elementTypeSignature.toDescriptor())); operandStack.push(Type.getType(Class.class));
methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/EnumSet", "noneOf", "(Ljava/langClass;)Ljava/util/EnumSet;", false); operandStack.replaceTop(Type.getType(EnumSet.class));
methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/EnumSet", "noneOf", "(Ljava/lang/Class;)Ljava/util/EnumSet;", false); operandStack.replaceTop(Type.getType(EnumSet.class));
} else {
//call nullary constructor (this may fail at runtime with a NoSuchMethodDefError) //TODO generate try-catch code?
methodVisitor.visitTypeInsn(NEW, implementationClassName); operandStack.push(Type.getObjectType(collectionTypeName));
Expand Down

0 comments on commit 5d0e754

Please sign in to comment.