-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55c2002
commit e8428e1
Showing
5 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
package dotty.tools.dotc.core.tasty | ||
|
||
import dotty.tools.tasty.TastyFormat | ||
|
||
class Attributes( | ||
val scala2StandardLibrary: Boolean, | ||
val explicitNulls: Boolean, | ||
) | ||
val booleanTags: List[Int], | ||
) { | ||
def scala2StandardLibrary: Boolean = | ||
booleanTags.contains(TastyFormat.SCALA2STANDARDLIBRARYattr) | ||
def explicitNulls: Boolean = | ||
booleanTags.contains(TastyFormat.EXPLICITNULLSattr) | ||
} | ||
|
||
object Attributes: | ||
def apply( | ||
scala2StandardLibrary: Boolean, | ||
explicitNulls: Boolean, | ||
): Attributes = | ||
val booleanTags = List.newBuilder[Int] | ||
if scala2StandardLibrary then booleanTags += TastyFormat.SCALA2STANDARDLIBRARYattr | ||
if explicitNulls then booleanTags += TastyFormat.EXPLICITNULLSattr | ||
new Attributes(booleanTags.result()) | ||
end apply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters