10000 [Sema] Fix compiler error when extending a typealias of a partially specialized generic type by xavgru12 · Pull Request #73169 · swiftlang/swift · GitHub
[go: up one dir, main page]

Skip to content

[Sema] Fix compiler error when extending a typealias of a partially specialized generic type #73169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7025a0d
comment out isPassThroughTypealies
xavgru12 Apr 21, 2024
772995f
merge with main
xavgru12 Jan 17, 2025
0e2ee58
copy isPassThroughTypealias to isTypeInferredByTypealias and comment …
xavgru12 Jan 23, 2025
f95b4a5
add declaration of new function
xavgru12 Jan 23, 2025
f7cbfb4
merge with main
xavgru12 Jan 23, 2025
a6b222b
merge with main
xavgru12 Jan 25, 2025
11bff2a
merge with main
xavgru12 Jan 25, 2025
fb4dcdd
checkout main
xavgru12 Jan 25, 2025
74fc932
comment out isPassThroughTypealies
xavgru12 Apr 21, 2024
6f6f37f
copy isPassThroughTypealias to isTypeInferredByTypealias and comment …
xavgru12 Jan 23, 2025
8f45a15
add declaration of new function
xavgru12 Jan 23, 2025
e1ab6bb
remove oudtdated file
xavgru12 Jan 25, 2025
e513182
first version
xavgru12 Mar 9, 2025
06d2a96
returns only true if no unsupported type conversion is entered
xavgru12 Mar 9, 2025
7c2dae5
add back spaces
xavgru12 Mar 10, 2025
8719c90
remove more unwanted changes
xavgru12 Mar 10, 2025
bd7a393
get rid of unneeded changes
xavgru12 Mar 10, 2025
6a81633
according to github issue, this is supposed to fail, but the error me…
xavgru12 Mar 11, 2025
0a5afa6
add unit test for the new supported case
xavgru12 Mar 11, 2025
2dcb95f
remove unneeded include
xavgru12 Mar 31, 2025
2a53487
commit forced blank lines
xavgru12 Mar 31, 2025
eb49f5a
remove unneeded copy
xavgru12 Mar 31, 2025
86f74ca
remove extra brackets
xavgru12 Mar 31, 2025
6302d7d
remove comment
xavgru12 Mar 31, 2025
871df92
format code
xavgru12 Mar 31, 2025
ea8f12c
change variable name
xavgru12 Mar 31, 2025
2a929de
change location of function
xavgru12 Mar 31, 2025
997bd4e
remove unneeded check§
xavgru12 Mar 31, 2025
b102077
correct location
xavgru12 Mar 31, 2025
b5a899e
Revert "commit forced blank lines"
xavgru12 Mar 31, 2025
491fd95
revert evaluate ternary operator
xavgru12 Mar 31, 2025
99d29cb
whitespace
xavgru12 Mar 31, 2025
b070615
Revert "commit forced blank lines"
xavgru12 Mar 31, 2025
a68d748
whitespace
xavgru12 Mar 31, 2025
aec1481
Revert "commit forced blank lines"
xavgru12 Mar 31, 2025
a18c1b3
add missing bracket
xavgru12 Mar 31, 2025
f42dc3b
Revert "commit forced blank lines"
xavgru12 Mar 31, 2025
9aa17c5
Merge branch 'main' into merge_in_typealias
xavgru12 Apr 3, 2025
7240766
make the new function static
xavgru12 Apr 15, 2025
ed5ddbd
add typealiasBoundGenericType->hasTypeParameter()
xavgru12 Apr 15, 2025
fa9c005
add test case for typealiasBoundGenericType->hasTypeParameter() infer…
xavgru12 Apr 15, 2025
4d26c68
remove redundant check
xavgru12 Apr 15, 2025
de51bf2
fix typo
xavgru12 Apr 15, 2025
6340373
breaking expected fail
xavgru12 Apr 16, 2025
c4eb3a6
add test case for making type check stricter
xavgru12 Apr 17, 2025
3d8aabb
add isGeneric check
xavgru12 Apr 17, 2025
aeb2e73
add assert
xavgru12 Apr 17, 2025
be58943
make sure no exotic cases slip through
xavgru12 May 4, 2025
6d61966
add test case for expected fail
xavgru12 May 4, 2025
98a9f2e
add test case extension for expected pass
xavgru12 May 4, 2025
bd7df19
Merge remote-tracking branch 'origin/main' into generic_typealias
xavgru12 Jun 5, 2025
b480ceb
rename struct to fix redeclaration after merge
xavgru12 Jun 5, 2025
ad5d532
remove assert since it breaks 4 tests: Compatibility/stdlib_generic_t…
xavgru12 Jun 5, 2025
cc1b299
remove superfluous getPointer
xavgru12 Jun 5, 2025
04c1f72
add another test case
xavgru12 Jun 5, 2025
8a849b7
remove isInferredType
10000 xavgru12 Jun 5, 2025
87cdebf
minimize diagnostic noise
xavgru12 Jun 5, 2025
be17e78
add test case
xavgru12 Jun 5, 2025
8a71a9a
changed foreach to while
xavgru12 Jun 5, 2025
6fb08c1
update test case with where
xavgru12 Jun 5, 2025
fe2fc6d
remove comments
xavgru12 Jun 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
comment out isPassThroughTypealies
  • Loading branch information
xavgru12 committed Apr 21, 2024
commit 7025a0d231b2b47987c691afdff52f721071d2ee
6 changes: 3 additions & 3 deletions lib/Sema/TypeCheckDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3041,11 +3041,11 @@ ExtendedTypeRequest::evaluate(Evaluator &eval, ExtensionDecl *ext) const {
if (auto *aliasDecl = dyn_cast<TypeAliasDecl>(unboundGeneric->getDecl())) {
auto underlyingType = aliasDecl->getUnderlyingType();
if (auto extendedNominal = underlyingType->getAnyNominal()) {
return TypeChecker::isPassThroughTypealias(
return extendedType; /*TypeChecker::isPassThroughTypealias(
aliasDecl, extendedNominal)
? extendedType
: extendedNominal->getDeclaredType();
}
: extendedNominal->getDeclaredType(); */
}

if (underlyingType->is<TupleType>()) {
return extendedType;
Expand Down
0