File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
tests/regression/test/v2-migrated Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ import {
3636 getAuthDecl ,
3737 getRecursiveBases ,
3838 isAuthInvocation ,
39- isCollectionPredicate ,
4039 isBeforeInvocation ,
40+ isCollectionPredicate ,
4141 resolveImportUri ,
4242} from './utils' ;
4343
@@ -75,7 +75,7 @@ export class ZModelScopeComputation extends DefaultScopeComputation {
7575
7676 override processNode ( node : AstNode , document : LangiumDocument < AstNode > , scopes : PrecomputedScopes ) {
7777 super . processNode ( node , document , scopes ) ;
78- if ( isDataModel ( node ) ) {
78+ if ( isDataModel ( node ) || isTypeDef ( node ) ) {
7979 // add base fields to the scope recursively
8080 const bases = getRecursiveBases ( node ) ;
8181 for ( const base of bases ) {
Original file line number Diff line number Diff line change @@ -4,18 +4,18 @@ import { it } from 'vitest';
44it ( 'verifies issue 971' , async ( ) => {
55 await loadSchema (
66 `
7- abstract model Level1 {
7+ type Level1 {
88 id String @id @default(cuid())
99 URL String?
1010 @@validate(URL != null, "URL must be provided") // works
1111}
12- abstract model Level2 extends Level1 {
12+ type Level2 with Level1 {
1313 @@validate(URL != null, "URL must be provided") // works
1414}
15- abstract model Level3 extends Level2 {
15+ type Level3 with Level2 {
1616 @@validate(URL != null, "URL must be provided") // doesn't work
1717}
18- model Foo extends Level3 {
18+ model Foo with Level3 {
1919}
2020 ` ,
2121 ) ;
You can’t perform that action at this time.
0 commit comments