Created
May 2, 2013 14:58
-
-
Save v6ak/5502816 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| case object BoolType extends Type with StandardType{ | |
| def getCommonSuperType(other: Type) = other match { | |
| case BoolType => BoolType | |
| case _ => combineWith(other) | |
| } | |
| def getSimpleStringRepresentation = "Boolean" | |
| def getClasses = Nil | |
| } | |
| final case class ArrayType(base: Type) extends Type{ | |
| def getCommonSuperType(other: Type) = other match { | |
| case ArrayType(otherBase) => ArrayType(base getCommonSuperType otherBase) | |
| case _ => combineWith(other) | |
| } | |
| def getSimpleStringRepresentation = "List["+base+"]" | |
| def getClasses = base.getClasses | |
| def getStandardStringRepresentation(naming: Map[ClassInfo, String]) = "List["+base.getStandardStringRepresentation(naming)+"]" | |
| def getWrappedClass = base.getWrappedClass | |
| def classNameSuggestions = base.classNameSuggestions | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment