Hotfix 3.3.3#19818
Merged
Kordyjan merged 5 commits intorelease-3.3.3from Feb 29, 2024
Merged
Conversation
14 tasks
sjrd
approved these changes
Feb 28, 2024
ritschwumm
reviewed
Feb 28, 2024
|
|
||
| ## 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.
typo: "treverser" should probably be "traverser"
e497a42 to
5e0de64
Compare
Member
|
@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 20then 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())
}
} |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19815
contents: