Skip to content

Commit 0e81fd6

Browse files
committed
---
yaml --- r: 348122 b: refs/heads/master c: 63e488e h: refs/heads/master
1 parent be3b561 commit 0e81fd6

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7fdd67cd20c72f56b6aeb50ce9f1451e3010bd90
2+
refs/heads/master: 63e488e4f4e8025d655c337b2cc7b12efe538b7e
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/SILGen/SILGenThunk.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,15 @@ getOrCreateReabstractionThunk(CanSILFunctionType thunkType,
311311
->getCanonicalType();
312312
auto toInterfaceType = toType->mapTypeOutOfContext()
313313
->getCanonicalType();
314+
CanType dynamicSelfInterfaceType;
315+
if (dynamicSelfType)
316+
dynamicSelfInterfaceType = dynamicSelfType->mapTypeOutOfContext()
317+
->getCanonicalType();
314318

315319
Mangle::ASTMangler NewMangler;
316320
std::string name = NewMangler.mangleReabstractionThunkHelper(thunkType,
317-
fromInterfaceType, toInterfaceType, dynamicSelfType,
321+
fromInterfaceType, toInterfaceType,
322+
dynamicSelfInterfaceType,
318323
M.getSwiftModule());
319324

320325
auto loc = RegularLocation::getAutoGeneratedLocation();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-swift-emit-silgen %s -verify
2+
3+
func foo<T>(_ f: () -> T) -> T { return f() }
4+
5+
class Foo<U> {
6+
func bar() -> Self {
7+
return foo { self }
8+
}
9+
}

0 commit comments

Comments
 (0)