Skip to content

Commit 7141b1b

Browse files
private_opaques -> opaques
Summary: rename to avoid confusion Reviewed By: michalmuskala, VLanvin Differential Revision: D71050349 fbshipit-source-id: d238ab94e6578d6d5105992198ab05e50d5ee9eb
1 parent 5f029da commit 7141b1b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/ast/stub/DbApi.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ object DbApi {
4848
}
4949
}
5050

51-
def getPrivateOpaque(module: String, id: Id): Option[TypeDecl] =
52-
Db.getModuleStub(module).flatMap(_.privateOpaques.get(id))
51+
def getOpaque(module: String, id: Id): Option[TypeDecl] =
52+
Db.getModuleStub(module).flatMap(_.opaques.get(id))
5353

5454
def getRecord(module: String, record: String): Option[RecDecl] =
5555
Db.getModuleStub(module).flatMap(_.records.get(record))

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/ast/stub/ModuleStub.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private case class ModuleStub(
1616
exports: Set[Id],
1717
imports: Map[Id, String],
1818
exportTypes: Set[Id],
19-
privateOpaques: Map[Id, TypeDecl],
19+
opaques: Map[Id, TypeDecl],
2020
types: Map[Id, TypeDecl],
2121
specs: Map[Id, FunSpec],
2222
overloadedSpecs: Map[Id, OverloadedFunSpec],

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/tc/Util.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ class Util(pipelineContext: PipelineContext) {
105105
.map(applyType)
106106
.getOrElse({
107107
if (pipelineContext.module == remoteId.module) {
108-
applyType(DbApi.getPrivateOpaque(module, id).get)
108+
applyType(DbApi.getOpaque(module, id).get)
109109
} else {
110-
assert(DbApi.getPrivateOpaque(remoteId.module, id).isDefined, s"could not find $remoteId from $module")
110+
assert(DbApi.getOpaque(remoteId.module, id).isDefined, s"could not find $remoteId from $module")
111111
OpaqueType(remoteId, args)
112112
}
113113
})

eqwalizer/src/main/scala/com/whatsapp/eqwalizer/tc/generics/Variance.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Variance(pipelineContext: PipelineContext) {
2828
tDecl.params.map(varType => varianceOf(tDecl.body, varType.n, isPositivePosition = true))
2929
case None =>
3030
// Opaques are covariant
31-
DbApi.getPrivateOpaque(remoteId.module, id).get.params.map(_ => Covariant)
31+
DbApi.getOpaque(remoteId.module, id).get.params.map(_ => Covariant)
3232
}
3333
}
3434

0 commit comments

Comments
 (0)