-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix 3.3.3 #19818
Hotfix 3.3.3 #19818
Conversation
|
||
## Linting | ||
|
||
- Wunused: Only use type treverser for checking refinements in refined type trees [#17929](https://github.com/lampepfl/dotty/pull/17929) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "treverser" should probably be "traverser"
e497a42
to
5e0de64
Compare
@Kordyjan just a note on this fix, I think we should still do something about the unique name counters for 3.4, it seems ultimately it works due to shadowing rules, but you do get some weird code gen: class Test {
def foo[T: Numeric]: String ?=> T = summon[Numeric[T]].fromInt(summon[String].length)
} by typer we have package <empty> {
class Test() extends Object() {
def foo[T >: Nothing <: Any](implicit evidence$1: Numeric[T]):
(String) ?=> T =
{
def $anonfun(using evidence$1: String): T =
evidence$1.fromInt(evidence$1.length())
closure($anonfun)
}
}
} i.e. 86: BLOCK(57)
88: LAMBDA(2)
90: TERMREFdirect 92
92: DEFDEF(51) 23 [$anonfun]
95: PARAM(4) 17 [[Unique evidence$ 1]]
98: SHAREDtype 76
100: GIVEN
101: SHAREDtype 65
103: APPLY(38)
105: SELECTin(17) 27 [fromInt[Signed Signature(List(scala.Int),java.lang.Object) @fromInt]]
108: INLINED(10)
110: INLINED(2)
112: TERMREFdirect 50 // ref to the parameter evidence$1
114: IDENTtpt 28 [Predef[ModuleClass]]
116: TYPEREF 28 [Predef[ModuleClass]]
118: SHAREDtype 30
120: TYPEREF 18 [Numeric]
122: TERMREFpkg 30 [scala[Qualified . math]]
124: APPLY(17)
126: SELECTin(15) 32 [length[Signed Signature(List(),scala.Int) @length]]
129: INLINED(8)
131: INLINED(2)
133: TERMREFdirect 95 // ref to the parameter evidence$1
135: IDENTtpt 28 [Predef[ModuleClass]]
137: SHAREDtype 116
139: TYPEREF 21 [String]
141: SHAREDtype 20 then by genBCode we have flattened the parameter lists package <empty> {
@SourceFile("Test.scala") class Test extends Object {
def <init>(): Unit =
{
super()
()
}
@ContextResultCount(1) def foo(implicit evidence$1: scala.math.Numeric,
evidence$1: String): Object = evidence$1.fromInt(evidence$1.length())
}
} |
Fixes #19815
contents: