-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hashCode for TupleType, make error messages/types consistent, use…
… compact syntax for single-line functions, start using string templates
- Loading branch information
Showing
16 changed files
with
117 additions
and
194 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
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
32 changes: 10 additions & 22 deletions
32
Src/java/model/src/main/java/org/hl7/cql/model/InvalidRedeclarationException.kt
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,24 +1,12 @@ | ||
package org.hl7.cql.model | ||
|
||
import java.util.* | ||
|
||
class InvalidRedeclarationException : IllegalArgumentException { | ||
constructor() : super() | ||
|
||
constructor(s: String?) : super(s) | ||
|
||
constructor( | ||
classType: ClassType, | ||
original: ClassTypeElement, | ||
redeclared: ClassTypeElement | ||
) : super( | ||
String.format( | ||
Locale.US, | ||
"%s.%s cannot be redeclared with type %s because it is not a subtype of the original element type %s", | ||
classType.name, | ||
redeclared.name, | ||
redeclared.type, | ||
original.type | ||
) | ||
class InvalidRedeclarationException( | ||
classType: ClassType, | ||
original: ClassTypeElement, | ||
redeclared: ClassTypeElement | ||
) : | ||
IllegalArgumentException( | ||
"""${classType.name}.${redeclared.name} cannot be redeclared | ||
with type ${redeclared.type} because it is not a subtype | ||
of the original element type ${original.type} in class ${classType.name}""" | ||
.trimIndent() | ||
) | ||
} |
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
Oops, something went wrong.