<commit_before>package org.jetbrains.plugins.scala
package lang
package psi
package types

import impl.toplevel.synthetic.{SyntheticClasses, ScSyntheticClass}
import com.intellij.openapi.project.Project
import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.{PsiElement, PsiManager}
import impl.ScalaPsiManager
import extensions.toPsiClassExt
import api.toplevel.typedef.ScObject


abstract class StdType(val name: String, val tSuper: Option[StdType]) extends ValueType {
  def visitType(visitor: ScalaTypeVisitor) {
    visitor.visitStdType(this)
  }

  /**
   * Return wrapped to option appropriate synthetic class.
   * In dumb mode returns None (or before it ends to register classes).
   * @param project in which project to find this class
   * @return If possible class to represent this type.
   */
  def asClass(project: Project): Option[ScSyntheticClass] = {
    if (SyntheticClasses.get(project).isClassesRegistered)
      Some(SyntheticClasses.get(project).byName(name).get)
    else None
  }

  override def equivInner(r: ScType, subst: ScUndefinedSubstitutor, falseUndef: Boolean): (Boolean, ScUndefinedSubstitutor) = {
    (this, r) match {
      case (l: StdType, _: StdType) => (l == r, subst)
      case (AnyRef, _) => {
        ScType.extractClass(r) match {
          case Some(clazz) if clazz.qualifiedName == "java.lang.Object" => (true, subst)
          case _ => (false, subst)
        }
      }
      case (_, _) => {
        ScType.extractClass(r) match {
          case Some(o: ScObject)  => (false, subst)
          case Some(clazz) if clazz.qualifiedName == "scala." + name => (true, subst)
          case _ => (false, subst)
        }
      }
    }
  }
}

object StdType {
  val QualNameToType = Map(
    "scala.Any" -> Any,
    "scala.AnyRef" -> AnyRef,
    "scala.AnyVal" -> AnyVal,
    "scala.Unit" -> Unit,
    "scala.Boolean" -> Boolean,
    "scala.Byte" -> Byte,
    "scala.Short" -> Short,
    "scala.Char" -> Char,
    "scala.Int" -> Int,
    "scala.Long" -> Long,
    "scala.Double" -> Double,
    "scala.Null" -> Null,
    "scala.Nothing" -> Nothing,
    "scala.Singleton" -> Singleton
  )

  def unapply(tp: StdType): Option[(String, Option[StdType])] = Some(tp.name, tp.tSuper)
}
<commit_msg>Added scala.Float to StdType.QualNameToType #SCL-3802 fixed<commit_after>package org.jetbrains.plugins.scala
package lang
package psi
package types

import impl.toplevel.synthetic.{SyntheticClasses, ScSyntheticClass}
import com.intellij.openapi.project.Project
import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.{PsiElement, PsiManager}
import impl.ScalaPsiManager
import extensions.toPsiClassExt
import api.toplevel.typedef.ScObject


abstract class StdType(val name: String, val tSuper: Option[StdType]) extends ValueType {
  def visitType(visitor: ScalaTypeVisitor) {
    visitor.visitStdType(this)
  }

  /**
   * Return wrapped to option appropriate synthetic class.
   * In dumb mode returns None (or before it ends to register classes).
   * @param project in which project to find this class
   * @return If possible class to represent this type.
   */
  def asClass(project: Project): Option[ScSyntheticClass] = {
    if (SyntheticClasses.get(project).isClassesRegistered)
      Some(SyntheticClasses.get(project).byName(name).get)
    else None
  }

  override def equivInner(r: ScType, subst: ScUndefinedSubstitutor, falseUndef: Boolean): (Boolean, ScUndefinedSubstitutor) = {
    (this, r) match {
      case (l: StdType, _: StdType) => (l == r, subst)
      case (AnyRef, _) => {
        ScType.extractClass(r) match {
          case Some(clazz) if clazz.qualifiedName == "java.lang.Object" => (true, subst)
          case _ => (false, subst)
        }
      }
      case (_, _) => {
        ScType.extractClass(r) match {
          case Some(o: ScObject)  => (false, subst)
          case Some(clazz) if clazz.qualifiedName == "scala." + name => (true, subst)
          case _ => (false, subst)
        }
      }
    }
  }
}

object StdType {
  val QualNameToType = Map(
    "scala.Any" -> Any,
    "scala.AnyRef" -> AnyRef,
    "scala.AnyVal" -> AnyVal,
    "scala.Unit" -> Unit,
    "scala.Boolean" -> Boolean,
    "scala.Byte" -> Byte,
    "scala.Short" -> Short,
    "scala.Char" -> Char,
    "scala.Int" -> Int,
    "scala.Long" -> Long,
    "scala.Double" -> Double,
    "scala.Float" -> Float,
    "scala.Null" -> Null,
    "scala.Nothing" -> Nothing,
    "scala.Singleton" -> Singleton
  )

  def unapply(tp: StdType): Option[(String, Option[StdType])] = Some(tp.name, tp.tSuper)
}

{'fraction_non_alphanumeric': 0.13062472695500219, 'fraction_numerical': 0.0008737439930100481, 'mean_word_length': 3.125225225225225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7248065', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1506, 'n_words': 359}