File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ object report:
9393 */
9494 def log (msg : => String , pos : SourcePosition = NoSourcePosition )(using Context ): Unit =
9595 if (ctx.settings.Ylog .value.containsPhase(ctx.phase))
96- echo(s " [log $ctx.phase] $msg" , pos)
96+ echo(s " [log ${ ctx.phase} ] $msg" , pos)
9797
9898 def debuglog (msg : => String )(using Context ): Unit =
9999 if (ctx.debug) log(msg)
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ trait Dynamic {
168168
169169 val scall =
170170 if (vargss.isEmpty) base
171- else untpd.Apply (base, vargss.flatten)
171+ else untpd.Apply (base, vargss.flatten.map(untpd. TypedSplice (_)) )
172172
173173 // If function is an `applyDynamic` that takes a ClassTag* parameter,
174174 // add `ctags`.
Original file line number Diff line number Diff line change 1+ import scala .reflect .Selectable .reflectiveSelectable
2+
3+ object Test {
4+ def main (args : Array [String ]): Unit = {
5+ class Foo {
6+ def makeInt : Int = 5
7+ def testInt (x : Int ): Unit = assert(5 == x)
8+
9+ def makeRef : Option [String ] = Some (" hi" )
10+ def testRef (x : Option [String ]): Unit = assert(Some (" hi" ) == x)
11+ }
12+
13+ def test (foo : {
14+ def makeInt : Int
15+ def testInt (x : Int ): Unit
16+ def makeRef : Option [String ]
17+ def testRef (x : Option [String ]): Unit
18+ }): Unit = {
19+ foo.testInt(foo.makeInt)
20+ // ^
21+ // cannot infer type; expected type <?> is not fully defined
22+ foo.testRef(foo.makeRef)
23+ // ^
24+ // cannot infer type; expected type <?> is not fully defined
25+ }
26+
27+ test(new Foo )
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments