From 9933458cafc6131d96775dce2d802603cfc618f7 Mon Sep 17 00:00:00 2001 From: Bogan Voloshin Date: Mon, 4 Jan 2021 18:14:16 +0300 Subject: [PATCH] Update typeclass errors --- CodeExamples/Typeclasses/TypeClassErrors/tc_err4.pas | 11 ++++++++--- CodeExamples/Typeclasses/TypeClassErrors/tc_err5.pas | 12 ++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CodeExamples/Typeclasses/TypeClassErrors/tc_err4.pas b/CodeExamples/Typeclasses/TypeClassErrors/tc_err4.pas index d0119bfc0..e3112d1e0 100644 --- a/CodeExamples/Typeclasses/TypeClassErrors/tc_err4.pas +++ b/CodeExamples/Typeclasses/TypeClassErrors/tc_err4.pas @@ -1,8 +1,13 @@ type - tc1[T] = typeclass end; + tc1[T] = typeclass + end; - I1=interface end; - tc1[I1] = instance end;//не должно компилироваться + I1=interface + end; + + tc1[I1] = instance + end;//не должно компилироваться begin + end. diff --git a/CodeExamples/Typeclasses/TypeClassErrors/tc_err5.pas b/CodeExamples/Typeclasses/TypeClassErrors/tc_err5.pas index e3112d1e0..58db97be4 100644 --- a/CodeExamples/Typeclasses/TypeClassErrors/tc_err5.pas +++ b/CodeExamples/Typeclasses/TypeClassErrors/tc_err5.pas @@ -1,13 +1,9 @@ -type - tc1[T] = typeclass - end; +type + tc1[T]=typeclass end; - I1=interface + tc1[integer]=instance + function f1: integer := 1; end; - - tc1[I1] = instance - end;//не должно компилироваться begin - end.