File tree 3 files changed +31
-2
lines changed
compiler/src/dotty/tools/dotc 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ object report:
93
93
*/
94
94
def log (msg : => String , pos : SourcePosition = NoSourcePosition )(using Context ): Unit =
95
95
if (ctx.settings.Ylog .value.containsPhase(ctx.phase))
96
- echo(s " [log $ctx.phase] $msg" , pos)
96
+ echo(s " [log ${ ctx.phase} ] $msg" , pos)
97
97
98
98
def debuglog (msg : => String )(using Context ): Unit =
99
99
if (ctx.debug) log(msg)
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ trait Dynamic {
168
168
169
169
val scall =
170
170
if (vargss.isEmpty) base
171
- else untpd.Apply (base, vargss.flatten)
171
+ else untpd.Apply (base, vargss.flatten.map(untpd. TypedSplice (_)) )
172
172
173
173
// If function is an `applyDynamic` that takes a ClassTag* parameter,
174
174
// 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