Skip to content

Commit

Permalink
test: model classes for types (#705)
Browse files Browse the repository at this point in the history
### Summary of Changes

Add tests for the model classes for types.
  • Loading branch information
lars-reimann authored Oct 29, 2023
1 parent 0549ed5 commit 96f44c7
Show file tree
Hide file tree
Showing 4 changed files with 478 additions and 132 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { SafeDsServices } from '../safe-ds-module.js';
import { SafeDsTypeComputer } from '../typing/safe-ds-type-computer.js';
import { EMPTY_STREAM, findLocalReferences, getContainerOfType, Stream } from 'langium';
import {
isSdsAbstractCall,
isSdsAnnotationCall,
Expand Down Expand Up @@ -28,8 +27,9 @@ import {
SdsTypeParameter,
SdsYield,
} from '../generated/ast.js';
import { SafeDsServices } from '../safe-ds-module.js';
import { CallableType, StaticType } from '../typing/model.js';
import { EMPTY_STREAM, findLocalReferences, getContainerOfType, Stream } from 'langium';
import { SafeDsTypeComputer } from '../typing/safe-ds-type-computer.js';
import {
getAbstractResults,
getArguments,
Expand Down Expand Up @@ -138,7 +138,7 @@ export class SafeDsNodeMapper {
} else if (isSdsCall(node)) {
const receiverType = this.typeComputer().computeType(node.receiver);
if (receiverType instanceof CallableType) {
return receiverType.sdsCallable;
return receiverType.callable;
} else if (receiverType instanceof StaticType) {
const declaration = receiverType.instanceType.declaration;
if (isSdsCallable(declaration)) {
Expand Down
Loading

0 comments on commit 96f44c7

Please sign in to comment.