Skip to content

Commit

Permalink
Refactor #2
Browse files Browse the repository at this point in the history
We're looping over indices and then indexing a *list*.
  • Loading branch information
Blaisorblade committed Aug 15, 2018
1 parent ddf26ee commit 040b831
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ object ProtoTypes {
s"inconsistent: no typevars were added to committable constraint ${state.constraint}")

def newTypeVars(tl: TypeLambda): List[TypeTree] =
for (n <- (0 until tl.paramNames.length).toList)
for (paramRef <- tl.paramRefs)
yield {
val tt = new TypeVarBinder().withPos(owningTree.pos)
val tvar = new TypeVar(tl.paramRefs(n), state)
val tvar = new TypeVar(paramRef, state)
state.ownedVars += tvar
tt.withType(tvar)
}
Expand Down

0 comments on commit 040b831

Please sign in to comment.