Skip to content

Commit 2236ac9

Browse files
committed
use explicit result type in test
1 parent 594306d commit 2236ac9

File tree

2 files changed

+32
-30
lines changed

2 files changed

+32
-30
lines changed

tests/pos/i20901/Foo.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import reflect.ClassTag
44

55
class Foo:
6-
def mkArray[T: ClassTag] = ???
6+
def mkArray[T: ClassTag]: Nothing = ???

tests/pos/i20901/Foo.tastycheck

+31-29
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ Names (276 bytes, starting from <elided base index>):
4141
34: Comments
4242
35: Attributes
4343

44-
Trees (94 bytes, starting from <elided base index>):
45-
0: PACKAGE(92)
44+
Trees (98 bytes, starting from <elided base index>):
45+
0: PACKAGE(96)
4646
2: TERMREFpkg 1 [<empty>]
4747
4: IMPORT(4)
4848
6: TERMREFpkg 4 [scala[Qualified . reflect]]
4949
8: IMPORTED 5 [ClassTag]
50-
10: TYPEDEF(82) 6 [Foo]
51-
13: TEMPLATE(61)
50+
10: TYPEDEF(86) 6 [Foo]
51+
13: TEMPLATE(65)
5252
15: APPLY(10)
5353
17: SELECTin(8) 13 [<init>[Signed Signature(List(),java.lang.Object) @<init>]]
5454
20: NEW
@@ -60,7 +60,7 @@ Trees (94 bytes, starting from <elided base index>):
6060
31: TYPEREF 14 [Unit]
6161
33: TERMREFpkg 2 [scala]
6262
35: STABLE
63-
36: DEFDEF(38) 15 [mkArray]
63+
36: DEFDEF(42) 15 [mkArray]
6464
39: TYPEPARAM(11) 16 [T]
6565
42: TYPEBOUNDStpt(8)
6666
44: TYPEREF 17 [Nothing]
@@ -75,47 +75,49 @@ Trees (94 bytes, starting from <elided base index>):
7575
63: IDENTtpt 16 [T]
7676
65: TYPEREFdirect 39
7777
67: IMPLICIT
78-
68: SHAREDtype 44
79-
70: TERMREF 21 [???]
80-
72: TERMREF 22 [Predef]
81-
74: SHAREDtype 33
82-
76: ANNOTATION(16)
83-
78: TYPEREF 23 [SourceFile]
84-
80: TERMREFpkg 27 [scala[Qualified . annotation][Qualified . internal]]
85-
82: APPLY(10)
86-
84: SELECTin(6) 31 [<init>[Signed Signature(List(java.lang.String),scala.annotation.internal.SourceFile) @<init>]]
87-
87: NEW
88-
88: SHAREDtype 78
89-
90: SHAREDtype 78
90-
92: STRINGconst 32 [<elided source file name>]
91-
94:
78+
68: IDENTtpt 17 [Nothing]
79+
70: TYPEREF 17 [Nothing]
80+
72: TERMREFpkg 2 [scala]
81+
74: TERMREF 21 [???]
82+
76: TERMREF 22 [Predef]
83+
78: SHAREDtype 33
84+
80: ANNOTATION(16)
85+
82: TYPEREF 23 [SourceFile]
86+
84: TERMREFpkg 27 [scala[Qualified . annotation][Qualified . internal]]
87+
86: APPLY(10)
88+
88: SELECTin(6) 31 [<init>[Signed Signature(List(java.lang.String),scala.annotation.internal.SourceFile) @<init>]]
89+
91: NEW
90+
92: SHAREDtype 82
91+
94: SHAREDtype 82
92+
96: STRINGconst 32 [<elided source file name>]
93+
98:
9294

93-
Positions (72 bytes, starting from <elided base index>):
95+
Positions (73 bytes, starting from <elided base index>):
9496
lines: 7
9597
line sizes:
96-
38, 0, 23, 0, 10, 32, 0
98+
38, 0, 23, 0, 10, 41, 0
9799
positions:
98-
0: 40 .. 108
100+
0: 40 .. 117
99101
4: 40 .. 63
100102
6: 47 .. 54
101103
8: 55 .. 63
102-
10: 65 .. 108
103-
13: 78 .. 108
104+
10: 65 .. 117
105+
13: 78 .. 117
104106
21: 71 .. 71
105107
27: 78 .. 78
106108
31: 78 .. 78
107-
36: 78 .. 108
109+
36: 78 .. 117
108110
39: 90 .. 101
109111
44: 93 .. 93
110112
48: 93 .. 93
111113
52: 93 .. 101
112114
57: 93 .. 101
113115
63: 93 .. 101
114-
68: 102 .. 102
115-
70: 105 .. 108
116-
82: 65 .. 108
117-
88: 65 .. 65
116+
68: 104 .. 111
117+
74: 114 .. 117
118+
86: 65 .. 117
118119
92: 65 .. 65
120+
96: 65 .. 65
119121

120122
source paths:
121123
0: 32 [<elided source file name>]

0 commit comments

Comments
 (0)