Skip to content

Commit b15bd30

Browse files
committed
FunProtoTyped to be used when args are known to be typed
1 parent 2c75762 commit b15bd30

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/dotty/tools/dotc/typer/ProtoTypes.scala

+10
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ object ProtoTypes {
227227
override def deepenProto(implicit ctx: Context) = derivedFunProto(args, resultType.deepenProto, typer)
228228
}
229229

230+
231+
/** A prototype for expressions that appear in function position
232+
*
233+
* [](args): resultType, where args are known to be typed
234+
*/
235+
class FunProtoTyped(args: List[tpd.Tree], resultType: Type, typer: Typer)(implicit ctx: Context) extends FunProto(args, resultType, typer)(ctx) {
236+
override def typedArgs = args
237+
override def argsAreTyped = true
238+
}
239+
230240
/** A prototype for implicitly inferred views:
231241
*
232242
* []: argType => resultType

0 commit comments

Comments
 (0)