Skip to content

Instantly share code, notes, and snippets.

using System;
using Mirage;
using NetworkCore;
using Unity.VisualScripting;
using UnityEditor;
using UnityEditor.Rendering;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
[error] (run-main-0) org.scalameta.invariants.InvariantFailedException: invariant failed:
[error] when verifying ScalametaTokenizer.this.input.chars.apply(curr.endOffset.+(1)).==('\"')
[error] found that ScalametaTokenizer.this.input.chars.apply(curr.endOffset.+(1)) is not equal to '\"'
[error] where ScalametaTokenizer = scala.meta.internal.tokenizers.ScalametaTokenizer@4ec60877
org.scalameta.invariants.InvariantFailedException: invariant failed:
when verifying ScalametaTokenizer.this.input.chars.apply(curr.endOffset.+(1)).==('\"')
found that ScalametaTokenizer.this.input.chars.apply(curr.endOffset.+(1)) is not equal to '\"'
where ScalametaTokenizer = scala.meta.internal.tokenizers.ScalametaTokenizer@4ec60877
at org.scalameta.invariants.InvariantFailedException$.raise(Exceptions.scala:15)
at scala.meta.internal.tokenizers.ScalametaTokenizer.emitContents$1(ScalametaTokenizer.scala:223)
def isCaseClass(tree: Tree): Boolean = {
tree.is[Defn.Class] && tree.children.exists(_.is[Mod.Case]) ||
tree.parent.exists(_.is[Defn.Class]) && tree.parent.exists(_.children.exists(_.is[Mod.Case]))
}
def isCaseObject(tree: Tree): Boolean = {
tree.is[Defn.Object] && tree.children.exists(_.is[Mod.Case]) ||
tree.parent.exists(_.is[Defn.Object]) && tree.parent.exists(_.children.exists(_.is[Mod.Case]))
}
@Daxten
Daxten / bug.scala
Last active February 3, 2017 17:03
val template = s"""
|trait RouteTrait extends ExtendedController with SimpleRouter with OptionalAuthElement with AuthConfigImpl with Circe {
| def routes: Router.Routes = {
|
| case GET(p"/pets" ? q_o"tags=$$tags" ? q_o"limit=$$limit") => AsyncStack { implicit request =>
| constructResult(findPets(tags, limit))
| }
|
| case POST(p"/pets") => AsyncStack(circe.json) { implicit request =>
| constructResult(addPet())
val root = "/pets"
val template = s"""
|object Bug {
|
| def router = {
| case GET(p"$root" ? q_o"tags=$$tags" ? q_o"limit=$$limit")
| }
|}
|
package components
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import scala.collection.mutable.ListBuffer
import scalacss.Defaults._
import scalacss.ScalaCssReact._
import scalacss.mutable.StyleSheet