Introduce KotlinTypeFactory

This commit is contained in:
Stanislav Erokhin
2016-05-20 19:24:32 +03:00
parent 8c6dd95e3f
commit 3a451744c5
29 changed files with 136 additions and 110 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ import org.jetbrains.kotlin.resolve.scopes.LexicalScope
import org.jetbrains.kotlin.resolve.scopes.MemberScope
import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.KotlinTypeImpl
import org.jetbrains.kotlin.types.KotlinTypeFactory
import java.util.regex.Pattern
class ConstraintSystemTestData(
@@ -64,9 +64,8 @@ class ConstraintSystemTestData(
val matcher = INTEGER_VALUE_TYPE_PATTERN.matcher(name)
if (matcher.find()) {
val number = matcher.group(1)!!
return KotlinTypeImpl.create(
Annotations.EMPTY, IntegerValueTypeConstructor(number.toLong(), functionFoo.builtIns), false, listOf(),
MemberScope.Empty
return KotlinTypeFactory.simpleType(Annotations.EMPTY, IntegerValueTypeConstructor(number.toLong(), functionFoo.builtIns),
listOf(), false, MemberScope.Empty
)
}
return typeResolver.resolveType(