Skip to content

Instantly share code, notes, and snippets.

@retronym
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retronym/9202209b9735f7095146 to your computer and use it in GitHub Desktop.
Save retronym/9202209b9735f7095146 to your computer and use it in GitHub Desktop.
======= Position error
Overlapping trees (544,539)
== Ancestor tree [560] of type Template at [22:163]t8596.scala
[L 1 ] #560 [22:163] Template // {
== First overlapping tree [544] of type Select at [131:159]t8596.scala
[L 5 ] #544 [131:159] Select // new Container().typeParamAndD
== Second overlapping tree [539] of type TypeTree at [155:158]t8596.scala
[L 5 ] #539 [155:158] TypeTree // Any]
While validating #562
[L 1 ] #562 [0:163] PackageDef // class TypeTreeObjects {
Children:
[L 1 P# 562] #64 [0:0] Ident // c
[L 1 P# 562] #561 [0:163] ClassDef // TypeTreeObjects {
class TypeTreeObjects {
class Container {
def typeParamAndDefaultArg[C](name: String = ""): String = ""
}
new Container().typeParamAndDefaultArg[Any]()
}
--- sandbox/good.txt 2014-05-28 18:42:13.000000000 +0200
+++ sandbox/bad.txt 2014-05-28 18:41:49.000000000 +0200
@@ -1,22 +1,22 @@
[[syntax trees at end of typer]] // t8596.scala
[0:163]package [0:0]<empty> {
[0:163]class TypeTreeObjects extends [22:163][163]scala.AnyRef {
- [22]def <init>(): [22]TypeTreeObjects = [22]{
- [22][22][22]TypeTreeObjects.super.<init>();
+ [163]def <init>(): [22]TypeTreeObjects = [163]{
+ [163][163][163]TypeTreeObjects.super.<init>();
[22]()
};
[26:113]class Container extends [42:113][114]scala.AnyRef {
- [42]def <init>(): [42]TypeTreeObjects.this.Container = [42]{
- [42][42][42]Container.super.<init>();
+ [114]def <init>(): [42]TypeTreeObjects.this.Container = [114]{
+ [114][114][114]Container.super.<init>();
[42]()
};
- [48:109]def typeParamAndDefaultArg[[75:76]C[75:76] >: [75]Nothing <: [75]Any]([78:95]name: [84:90]<type: [84:90][84]scala.this.Predef.String> = [93:95]""): [52]String = [107:109]"";
- [78]<synthetic> def typeParamAndDefaultArg$default$1[[75]C[75] >: [75]Nothing <: [75]Any]: [78]String @scala.annotation.unchecked.uncheckedVariance = [93]""
+ [48:109]def typeParamAndDefaultArg[[75:76]C[75:76]]([78:95]name: [84:90]<type: [84:90][84]scala.this.Predef.String> = [93:95]""): [52]String = [107:109]"";
+ [78]<synthetic> def typeParamAndDefaultArg$default$1[[75]C[75]]: [78]String = [93]""
};
<116:161>{
- [116:131]val qual$1: [116]TypeTreeObjects.this.Container = [116:131][116:131][116:131]new [120:129][120]TypeTreeObjects.this.Container();
- [154]val x$1: [154]String = [154][154]qual$1.typeParamAndDefaultArg$default$1[[155]<type: [155]scala.Any>];
- <116:161><116:159><116:159>qual$1.typeParamAndDefaultArg[[155:158]<type: [155:158]scala.Any>]([154]x$1)
+ <116:131><artifact> val qual$1: [116]TypeTreeObjects.this.Container = [116:131][116:131][116:131]new [120:129][120]TypeTreeObjects.this.Container();
+ [154]<artifact> val x$1: [154]String = [154][154]qual$1.typeParamAndDefaultArg$default$1[[155]<type: [155]scala.Any>];
+ <116:161><116:159>[131:159]qual$1.typeParamAndDefaultArg[[155:158]<type: [155:158]scala.Any>]([154]x$1)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment