Skip to content

Commit

Permalink
test: reference containing class from parent type list
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Sep 30, 2023
1 parent 1b04905 commit b458de1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/language/scoping/safe-ds-scope-computation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class SafeDsScopeComputation extends DefaultScopeComputation {
const description = this.descriptions.createDescription(node, name, document);

this.addToScopesIfKeyIsDefined(scopes, node.parameterList, description);
this.addToScopesIfKeyIsDefined(scopes, node.parentTypeList, description);
this.addToScopesIfKeyIsDefined(scopes, node.constraintList, description);
this.addToScopesIfKeyIsDefined(scopes, node.body, description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ package test.scoping.namedTypes.toContainingNamedTypeDeclaration
class »MyClass«<T>(
// $TEST$ references outerClass
p: »MyClass«
) where {
// $TEST$ references outerClass
) sub »MyClass« where {
// $TEST$ references outerClass
T sub »MyClass«
} {
Expand Down Expand Up @@ -65,7 +66,10 @@ class »MyClass«<T>(

// $TEST$ unresolved
p2: »MyEnum«,
) {

// $TEST$ references innerClass
// $TEST$ unresolved
) sub »MyClass«, »MyEnum« {
// $TEST$ references innerClass
attr a1: »MyClass«

Expand Down

0 comments on commit b458de1

Please sign in to comment.