All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty.tools.dotc.config.SJSPlatform.scala Maven / Gradle / Ivy

The newest version!
package dotty.tools.dotc.config

import dotty.tools.dotc.core._
import Contexts._
import Symbols._

import dotty.tools.backend.sjs.JSDefinitions

class SJSPlatform()(implicit ctx: Context) extends JavaPlatform {

  /** Scala.js-specific definitions. */
  val jsDefinitions: JSDefinitions = new JSDefinitions()

  /** Is the SAMType `cls` also a SAM under the rules of the Scala.js back-end? */
  override def isSam(cls: ClassSymbol)(implicit ctx: Context): Boolean =
    defn.isFunctionClass(cls) || jsDefinitions.isJSFunctionClass(cls)

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy