-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lookup symbols for refinements in RefinedType and RecType
- Loading branch information
1 parent
7dd91ad
commit 226e26f
Showing
9 changed files
with
372 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package example | ||
|
||
def m1/*<-example::RecOrRefined$package.m1().*/(a/*<-example::RecOrRefined$package.m1().(a)*/: Int/*->scala::Int#*/ { val x/*<-local0*/: Int/*->scala::Int#*/ }) = ???/*->scala::Predef.`???`().*/ | ||
def m2/*<-example::RecOrRefined$package.m2().*/(x/*<-example::RecOrRefined$package.m2().(x)*/: { val x/*<-local1*/: Int/*->scala::Int#*/; def y/*<-local2*/: Int/*->scala::Int#*/ }) = ???/*->scala::Predef.`???`().*/ | ||
def m3/*<-example::RecOrRefined$package.m3().*/(x/*<-example::RecOrRefined$package.m3().(x)*/: { val x/*<-local3*/: Int/*->scala::Int#*/; def y/*<-local4*/: Int/*->scala::Int#*/; type z/*<-local5*/ }) = ???/*->scala::Predef.`???`().*/ | ||
|
||
class Record/*<-example::Record#*/(elems/*<-example::Record#elems.*/: (String/*->scala::Predef.String#*/, Any/*->scala::Any#*/)*) extends Selectable/*->scala::Selectable#*/: | ||
private val fields/*<-example::Record#fields.*/ = elems/*->example::Record#elems.*/.toMap/*->scala::collection::IterableOnceOps#toMap().*//*->scala::`<:<`.refl().*/ | ||
def selectDynamic/*<-example::Record#selectDynamic().*/(name/*<-example::Record#selectDynamic().(name)*/: String/*->scala::Predef.String#*/): Any/*->scala::Any#*/ = fields/*->example::Record#fields.*//*->scala::collection::MapOps#apply().*/(name/*->example::Record#selectDynamic().(name)*/) | ||
|
||
type Person/*<-example::RecOrRefined$package.Person#*/ = Record/*->example::Record#*/ { | ||
val name/*<-local6*/: String/*->scala::Predef.String#*/ | ||
val age/*<-local7*/: Int/*->scala::Int#*/ | ||
} | ||
|
||
// RecType | ||
class C/*<-example::C#*/ { type T1/*<-example::C#T1#*/; type T2/*<-example::C#T2#*/ } | ||
type C2/*<-example::RecOrRefined$package.C2#*/ = C/*->example::C#*/ { type T1/*<-local8*/; type T2/*<-local9*/ = T1/*->local8*/ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package example | ||
|
||
def m1(a: Int { val x: Int }) = ??? | ||
def m2(x: { val x: Int; def y: Int }) = ??? | ||
def m3(x: { val x: Int; def y: Int; type z }) = ??? | ||
|
||
class Record(elems: (String, Any)*) extends Selectable: | ||
private val fields = elems.toMap | ||
def selectDynamic(name: String): Any = fields(name) | ||
|
||
type Person = Record { | ||
val name: String | ||
val age: Int | ||
} | ||
|
||
// RecType | ||
class C { type T1; type T2 } | ||
type C2 = C { type T1; type T2 = T1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.