Skip to content

Commit 085e5b3

Browse files
committed
Fix after rebase
1 parent fcfc1f6 commit 085e5b3

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/compiler/ModelCompiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ private TsModel addConstructors(SymbolTable symbolTable, TsModel tsModel) {
535535
final List<TsBeanModel> beans = new ArrayList<>();
536536
for (TsBeanModel bean : tsModel.getBeans()) {
537537
final Symbol beanIdentifier = symbolTable.getSymbol(bean.getOrigin());
538-
final List<TsType.GenericVariableType> typeParameters = getTypeParameters(bean.getOrigin());
538+
final List<TsType.BoundedGenericVariableType> typeParameters = getTypeParameters(symbolTable, bean.getOrigin());
539539
final TsType.ReferenceType dataType = typeParameters.isEmpty()
540540
? new TsType.ReferenceType(beanIdentifier)
541541
: new TsType.GenericReferenceType(beanIdentifier, typeParameters);

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/emitter/TsAliasModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99

1010
public class TsAliasModel extends TsDeclarationModel {
1111

12-
private final List<TsType.GenericVariableType> typeParameters;
12+
private final List<? extends TsType.GenericVariableType> typeParameters;
1313
private final TsType definition;
1414

15-
public TsAliasModel(Class<?> origin, Symbol name, List<TsType.GenericVariableType> typeParameters, TsType definition, List<String> comments) {
15+
public TsAliasModel(Class<?> origin, Symbol name, List<? extends TsType.GenericVariableType> typeParameters, TsType definition, List<String> comments) {
1616
super(origin, null, name, comments);
1717
this.typeParameters = typeParameters != null ? typeParameters : Collections.emptyList();
1818
this.definition = definition;
1919
}
2020

21-
public List<TsType.GenericVariableType> getTypeParameters() {
21+
public List<? extends TsType.GenericVariableType> getTypeParameters() {
2222
return typeParameters;
2323
}
2424

typescript-generator-core/src/test/java/cz/habarta/typescript/generator/KotlinTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class KotlinTest {
8989
val settings = TestUtils.settings()
9090
val output = TypeScriptGenerator(settings).generateTypeScript(Input.from(A2::class.java))
9191
val errorMessage = "Unexpected output: $output"
92-
Assert.assertTrue(errorMessage, output.contains("interface A2<S>"))
92+
Assert.assertTrue(errorMessage, output.contains("interface A2<S extends Enum<S>>"))
9393
}
9494

9595
private class A2<S> where S : Enum<S> {

typescript-generator-core/src/test/java/cz/habarta/typescript/generator/TaggedUnionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public void testWithTypeParameter() {
392392
final Settings settings = TestUtils.settings();
393393
final String output = new TypeScriptGenerator(settings).generateTypeScript(Input.from(Earth.class));
394394
Assert.assertTrue(output.contains("EngineUnion"));
395-
Assert.assertTrue(output.contains("VehiculeUnion<M>"));
395+
Assert.assertTrue(output.contains("VehiculeUnion<M extends Engine>"));
396396
}
397397

398398
public static void main(String[] args) throws Exception {

0 commit comments

Comments
 (0)